To start a GWT application, the client will often need some data to work with. Ideally this needs to happen without any extra requests fired. So not using rpc calls.
so, how to get server based data to the javascript world?
Our solution first was to use the Dictionary system. A spring requesthandler (servlet) renders the data to the page using a custom formatter and simple maps.
It worked, but in time the data became more complex and using simple maps was getting really complicated!
The next step has been to introduce the AutoBean system, part of GWT. It allows to covert a hierarchy of classes into json, and back into java/javascript. So combining this with a single dictionary works really nicely!
I'll post some urls later on these steps.
Oh and when passing javascript to the client, take security into consideration. Take a look at the Owasp threats and the ESAPI responses to them. Its actually not that hard to use, though the amount of features is a bit overwhelming.
Whats next?