GWT Tips

GWT (Google Web Toolkit) Tips

Thursday, May 1, 2008

Stubbing RPC calls in Google Web Toolkit's Hosted Mode

Level: Intermediate
Date: Originally published 10/07, updated 4/08.
Author: Richard Bondi,

In this post I describe a way to "fake" or "stub" your RPC calls in GWT's hosted mode. It allows you to deploy to web mode without having to change any code, change any configurations, and without any stub or development-only code being deployed. It's very clean, and will work with any web application setup (for example, Spring is optional).

The full post is available at http://docs.google.com/Doc?docid=dw2zgx2_106fd4mtt&hl=en.

Tuesday, January 1, 2008

How to Integrate Spring 2.x with the Google Web Toolkit (GWT)

Level: Intermediate
Date: Originally published 10/07, updated 4/08.
Author: Richard Bondi,

This post explains how to manage your GWT server-side services with Spring and Spring MVC, and to inject Spring beans into them.


The complete post is available at http://docs.google.com/Doc?docid=dw2zgx2_25492p5qxfq&hl=en.

Tuesday, July 17, 2007

Passing Events instead of Widgets to Listeners in the Google Web Toolkit (GWT)

Level: Advanced
Date: Originally published 10/07
Author: Richard Bondi,

In GWT, a listener object A may attach itself to many other widgets. These widgets will call A's onChange (or similar) method, and pass themselves as onChange's only parameter. Inside onChange, A must then decide which widget called it. The problem at this point is for a programmer unfamiliar with the code: there is no easy way for her to tell which of the widget's many methods and properties are intended to be used by A. The solution given here is to create an interface, named [widget's name]Event, that has only methods to be used inside of onChange. This makes for clean and understandable code.

The full text of this post is available at http://docs.google.com/Doc?id=dw2zgx2_331ns4qh527.

About this blog

Notes on the Google Web Toolkit and RoR.