On Apr 26, 4:12 pm, John Tamplin <j...@google.com> wrote:
> On Mon, Apr 26, 2010 at 9:21 AM, dflorey <daniel.flo...@gmail.com> wrote:
> > Is there a way to easily serialize GTW-serializable objects to string
> > on the client side?
> > I'd like to be able to story arbitrary objects to the html5/gears
> > local db as string.
> > Any ideas? Can I hook into the GWT rpc-serialization mechanism?
>
> The problem is for efficiency reasons the GWT RPC serialization is
> asymmetric -- the client can't deserialize what is serializes and
> vice-versa.
>
> Also, values stored in a local database will likely need to be used across
> versions of the app, so GWT RPC isn't really appropriate anyway -- probably
> better to use protobufs or JSON, though in either case you give up the
> ability to represent arbitrary Java object graphs.

D'oh, you're right of course, I forgot about the asymmetric encoding!

If anyone's interested in using Protobuf in GWT, (shameless plug) have
a look at my new pet project: http://code.google.com/p/protobuf-gwt/
And if you prefer Thrift to Protobuf, then have a look at gwt-rpc-plus
from DotSpots (and Matt Mastracci in particular): 
http://code.google.com/p/gwt-rpc-plus/

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to