Thursday, June 29, 2006

jQuery Is Awesome

I just donated to the jQuery project. I love jQuery, and it hasn't even hit 1.0 yet (soon).

jQuery is a fabulous javascript toolkit created by John Resig. It is similar in scope to several other javascript libraries, javascript frameworks, and javascript toolkits (so many names), such as Prototype, Mochikit, and Dojo.

There are several places around the web where these various toolkits are compared, but I think a lot of it boils down to: does the toolkit match my mental model? Ruby programmers like Prototype. Python programmers like Mochikit. Java programmers like Dojo.

Javascript programmers like jQuery.

jQuery allows you to do a whole helluva lot with very little. It is very lightweight. The base code, plus a few very fine extensions, weighs in at about 10KB. I hear version 1.0 will be about 15KB.

jQuery lets you select elements by using CSS syntax or XPath syntax. That is extremely powerful. And it provides dozens of handy functions for manipulating page elements in a clean, cross-platform way. jQuery has a shallow learning curve (if it matches your mental model) and is actually fun to use.

One area that has been particularly useful to me is in the generation of mockups for highly interactive web interfaces (Rich Internet Applications). jQuery allows me to quickly include some impressive and useful user interface controls that lend a great deal of fidelity to my mockups. It can even help you "fake" dynamic, database driven interaction.

The documentation for jQuery could use some help, but I hear that will happen soon with the upcoming 1.0 release. It isn't that what exists is bad, just that not all of the great features are documented. There is an avid community of developers, and John Resig is clearly passionate about the toolkit.

I highly recommend you give jQuery a try if you are looking for a lightweight and feature packed javascript toolkit.