Please see www.DataStoreGwt.com. It helps you to have a single object model for driving UI and for saving. It serializes an arbitrarily complex object graph at the client side and persists. J.Ganesan
On Saturday, October 20, 2012 2:00:14 AM UTC+5:30, dhoffer wrote: > > I'm really having a hard time finding something that will work here. > Regarding your suggestions: > > - Json Overlay Types > (This one I have not implemented yet...I was not sure how to do this) > - AutoBeans > I can't get this to work properly, there are no errors reported just > doesn't work at runtime. When using it on the server to encode I get a > null bean. When using it on the client I get what looks like a mock > instance (random derived type) of the right type but it has no data. > > - Frameworks like Piriti (http://code.google.com/p/piriti/) > This one almost worked...it generated code but because some of types I > marshal are parameterized (pass data of type T)...it generated code that > returned T but the class itself was not typed so java could not compile the > code. Seems it just does not handle parameterized types. > > - maybe you can borrow you some code from resty-gwt ( > http://restygwt.fusesource.org/documentation/restygwt-user-guide.html#JSON_Encoder_Decoders > ) > I had tried this one first...ran into a problem here too...just don't > recall the details. > > - you can roll your own solution using GWT's generators at compile time. > (Not sure how to do this either) > > Also...I found the gwt-streamer library it's purpose is to convert POJO to > JSON and/or XML and the reverse. This seemed ideal as then I could just > pass the resulting string as a single item JSON map but it didn't work > because the library contains code references that are not implemented in > the GWT JRE emulation library. So although it was advertised for client > side GWT apps I don't see how that is possible. > > Any other suggestions? Know of any good Json Overlay Types examples? > > Thanks, > -Dave > > > On Thursday, October 18, 2012 3:04:00 PM UTC-6, dhoffer wrote: >> >> I have some rather complex data objects that currently get marshaled from >> client to server and server to client (comet communication). Btw, not >> complex in quantity of data, or data relationships, but data is arrays of >> lots of different derived interface/class types. The data used to be just >> serialized but now it needs to be sent via JSON. >> >> Is it possible to perform regular Java object serialization in the GWT >> client? If so, I could solve this by converting that binary output into >> Base64 encoded string and send that via the new JSON API and then just >> reverse that on the server. Is it even possible to do this in GWT? >> >> Of course the other approach is to convert the Java object into a full >> JSON object but given it's complexity I haven't found a way to do that yet >> (I posted separate newsgroup message on that approach). Either approach >> would be fine for me, I can worry about performance differences later. >> >> -Dave >> > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/KAKNDUxmNUAJ. 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.
