New GWT Release 1.2.22

The Google Web Toolkit has a new stable release. You can read all about it here. It will be used for the new synformation web site, too.

I’ve started to use GWT since version 1.0 came out (August 25, 2006). It was easy to use and since I’m not very good at JavaScript programming, leave alone all the little things you have to know to make sure your JavaScript is compatible with all the different browsers, it was the right thing for me as a Java developer.

Integration with synformation is easy. I don’t use GWT’s RPC mechanism, but the JSON format for client-server communication. GWT finally supports sending requests with content-type application/x-www-form-urlencoded, which is how it’s normally done. On the server side, I can now use request.getParameter() instead of having to read the posted data directly. It’s really not a big deal, but more convenient. The new module provides the necessary functionality.

I’ve written a quick example. It’s available here. It sends formatting instructions to the server via JSON. The server formats the current time and sends the text back to the client. The relevant portion of the page is updated to display the current server time. Note that not the whole page is updated, only the text with the server time. That’s because client-server communication is done asynchronously in the background. Although it’s only a small example, it already has the complete communication architecture for RIAs.

0 comments… add one

Leave a Comment