Surveying open-source AJAX toolkits

31.07.2006

The oddest toolkit in the batch may be Google's (http://code.google.com/webtoolkit/). Whereas the others are written in JavaScript and meant to be integrated into your own JavaScript code, Google's Web Toolkit is written in Java itself and translated into JavaScript. When you write your code, you write Java and watch it get translated into JavaScript.

This isn't as magical as it sounds because JavaScript is pretty close to a superset of Java, at least in a cosmetic sense. It's not complicated to strip away some typing information from the Java code and end up with something that resembles JavaScript.

The translation is, however, a fascinating solution and one that Java programmers will both like and worry about. I found myself fretting over questions about when JavaScript will behave a bit differently than Java -- something that I don't do very often.

The breadth of the toolkit is solid. Google has built in many of the standard widgets but hasn't included some of the flashier mechanisms for animation.

I found Google's system surprisingly easy to use -- it ended up being close to working with a fancy version of the AWT (Abstract Window Toolkit) or a simpler version of Swing. The package is designed to build a full application that runs inside the browser, not just add a bit of zip to your flat pages.