I will probably write up a summary of my experience with this, but my
application just switched from using JSON to RPC as the payload for
the initial data set embedded in the original HTML sent from the
server on the first request.  We've also been slowly converting our
JSON HTTP requests to RPC calls.  Using RPC is vastly easier since you
have an entire Serialization layer you can throw away.

However, it does have drawbacks.  If you have massive amounts of data,
contrary to what gregor said above, the RPC calls will be
significantly slower on the client.  With JSON, the client does an
eval on the data and its ready to go.  That is very fast.  With RPC,
the GWT RPC deserialization code has the parse the data, walk over it,
and construct the relevant objects.  There is no way that will ever be
as fast as eval.

That said, the difference is insignificant for most of our RPC calls
and for the larger ones (where the amount of data makes for a slow
client anyway) we decided that the drop in performance was more than
worth the simplicity in our code.  There is one upside to this -
there's a project in the works that will modify the RPC payload format
so that it uses directly eval-able Javascript code so that
deserialization mechanism doesn't have to actively parse the payload
but can just eval the results into existence.  That would immediately
speed all RPC calls up for everyone.

It also has the added benefit of automatically ensuring that your data
model matches on the client and server.  We've been in the situation
where our data model was different on both side with JSON essentially
translating between the two.  This has made it difficult to write code
that can run on either the server or the client and use the same model.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
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