Surveying open-source AJAX toolkits

Google Web toolkit

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 to 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.

Open Rico and Prototype

One of the more prominent, pure open source AJAX projects is made up of a loosely knit coalition of projects including Open Rico (http://openrico.org/) and Prototype (http://prototype.conio.net/). Whereas Dojo is a single, big, unified project, these two and a few other smaller projects are all technically independent.

It's anyone's guess whether this loose bond is better or worse politically, but the results are just as impressive as those of the other libraries.

Rico and Prototype share more of an emphasis on animated effects and less on some of the pragmatic tools. For example, there's no tree and no emphasis on collecting data from a form, but the animated effects and the larger tools -- like a set of accordion panels -- are all there.

The Prototype library is a set of basic, low-level tools aimed at programmers. It has clean, simple functions, all given single-letter names to speed downloading. It's more of a shorthand for the common functions, and one you might want to adopt for your own code regardless of whether you use the larger mechanisms because it's a disciplined approach to writing smoother, simpler code.

Rico is a collection of some of the popular Ajax widgets and animations built on top of Prototype. You don't need to use Rico with Prototype, but it does make building AJAX apps simpler if you want the effects they offer.

I especially liked Rico's LiveGrid, a set of routines that enhance an HTML table by fetching data in the background as you scroll through the rows. It simplifies displaying a large volume of data in a small set of rows without forcing the user to load page after page. I often think of Rico as a smaller, simpler version of Dojo that does a few things better than Dojo, such as enabling drag-and-drop support.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

More about ApacheCreativeEvolveGoogleIBM AustraliaMicrosoftMozillaSpeedTibcoYahooZimbra

Show Comments
[]