Hi Roger, Then the only option left is xml, of course if we are not going GWT-RPC way.
So what do you think will be better JSON or XML ? I have created a GWT application, the communication with server part is pending, the server side is java but its an already existing application, so I need to hook something in between the service side application & GWT to communicate, so I am looking out if it should be json or xml. - Abdullah On Wed, Jan 27, 2010 at 5:11 PM, Roger Studner <[email protected]> wrote: > And to add one thing. > > Using JSON w/ GWT is well.. "awful". > > The main reason for this, is that you get JSON back to the client, and > either use Overlay Types (can't use instanceof with there, and about 500 > other issues).. or you hve to take a "simple" OverlayType and then > re-instantiate all of your objects (i.e. you do eval() once on the JSON, > then for-loop etc to re-instantiate objects from that JSONObject). > > And then, the joy doesn't stop. When you want to say, post JSON back to > the server, you have to redo this process, converting all the "java objects" > (which are of course actually javascript) into JSON. > > All in all, using JSON w/ GWT is a very (very) painful experience. > > THe humor of course, is that you have to convert objects "to and from Java" > so that you can then use all the "java" API's etc that GWT (just converts > into Javascript). > > Heh > > Roger > > On Jan 27, 2010, at 1:30 AM, Jan Ehrhardt wrote: > > The problem is the GWT RPC's serialization, which can't work with objects > created by hibernate. You can use the DTO Grails plugin ( > http://www.grails.org/plugin/dto) or you can use JSON / REST for > communication. > > In the case of a Grails app, which comes with great support for REST / > JSON, I would prefer the second way. > > Regards > Jan Ehrhardt > > On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, R&D < > [email protected]> wrote: > >> GWT is the obvious choice for UI. But if you want to use Grails/Groovy >> for server side, you have to either code messy DTOs or client side >> POJOs. It would be nice if GWT would support using the Grails/Groovy >> domain objects directly on the client. Any chance of that happening? >> >> -- >> 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]<google-web-toolkit%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> >> > > -- > 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. > > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- 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.
