It depends on whether the JSON is hierarchical or flat.

Take a look at the visitor pattern for complexer JSON structures.
http://en.wikipedia.org/wiki/Visitor_pattern


On 11 Sep., 17:40, Alex Rice <[EMAIL PROTECTED]> wrote:
> Good day all,
>
> I ordered the GWT in Practice book and eagerly awaiting it's arrival.
> Maybe maybe my question is answered in there. However, I wanted to see
> if anyone has a suggestion for a Java OO design pattern to use for the
> following purpose:
>
> I am working on a GWT project where application/survey forms are
> presented to the user. It downloads JSON from our server. The JSON
> describes the forms layout in terms of sections, fields, labels,
> formatting, and validation rules for the form the user is filling in.
> The forms and file attachments will get posted back to the server as
> JSON and as http file uploads.
>
> My question is- what is the best Java pattern for constructing the GWT
> UI on the fly at runtime as the JSON is read from the server? Like a
> Factory pattern ? Or an Object un-marshalling pattern? I am not that
> experienced with Java or with Design Patterns, but I have a feeling
> there is an ideal way to do this, I am just not aware of it.
>
> Also I am using a MVC pattern to separate the Data and the Views.
> Thanks in advance for any ideas or pointers on the above.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to