Feel Love for the Google Web Toolkit

The Google Web Toolkit (GWT for short) is unlike any other AJAX Api you’ve seen to date. GWT is nothing new to the world, it was introduced ages ago, and yet I’m supprised by the seemingly slow uptake of this amazing toolkit. Unlike DOJO, jMaki and co, GWT doesn’t even need you to code HTML! Thats right, no JavaScript, no HTML. So how does GWT work?

GWT is actually a Java compiler. Normally your Java compiler takes you Java source-code and spits out Java byte-code, GWT’s compiler however takes you Java source-code and spits out JavaScript. So you code your application using the lovely (really really nice) GWT Api’s, and run it through their compiler, and you’ve got a 100% cross-browser web-application. They include classes for all the standard HTML forum components; AJAX calls back to the server; and some extra Widgets like a Tree, Tab panel, Dialog or Popup DIV; and even an XML parser.

I’m working on a system that uses XML and XSLT heavily, the fact that I can have the browser construct the entire XML document and send it to me when the user is done with it makes a huge difference. All my servlet has to do with the XML is run it through a parser with validation enabled.