Tuesday, September 11, 2007

Google Web Toolkit : First Impressions

GWT is a framework for developing Ajax-like web applications. The major differentiator is that the code is developed primarily in java, and compiled into JavaScript for deployment on a standard web server.
The benefits up-front are those that favour java development in the first place: strong typing, debugging, unit testing, OO design, refactoring etc; all things that imrove the experience over pure-javascript development. The major drawback seems to be the fact that the java needs to be compiled to javascript at some stage and so is limited in the constructs and libraries that it can use.

From the getting-started examples, the code is developed like a Swing or Eclipse plugin; you create your UI controls, give them attributes and behaviour, and attach event handlers to react to user events and position all of this on a layout grid (if you like).

The model-view-controller paradigm is up to you to implement if that is the application structure you want to create. More natural is the AJAX structure where the application is hosted on a single html page, and all events trigger RPC calls to the server, and the response data displayed using scripting in the same page.

No comments: