JavaScript Toolkits

February 13th, 2007 by Ralf S. Engelschall

For building the OpenPKG dhtml package, I’ve evaluated “Web 2.0 toolkits”: you know, those reusable JavaScript libraries providing DOM querying and manipulation, on-the-fly XHTML generation, visually rich widgets and animations effects, AJAX for asynchronous background server communication, small JavaScript array and string object extensions and many more.

The available solutions seem to be split into two categories: the large, encyclopaedic and general ones and the small and problem focused ones. Both have their good right to exist, but even one more decision criteria doesn’t make the life easier for those who have to decide what to do. On top of this, not all solutions can be used side-by-side without conflicts. And because some are using a totally different API style, it becomes nasty if one has to program with multiple ones at the same time.

Nevertheless, there are a few more or less matured solutions available. Each with its own pros and cons (which I really don’t want to go into detail here), but mostly all of them are at least worth a look for everyone who seeks for a “Web 2.0 toolkit”:

Sorry, for all of them I personally looked not primarily at their features, but on the approach and implementation ;-) And here they differ also dramatically when it comes to documentation, code modularity and code maturity.

But at least three of them pleased me very much:

  • YUI: YAHOO!’s toolkit is both extensive, fully documented, has a very solid code base and has “just worked” for me on the OpenPKG websites. It certainly isn’t the most extensive or the most elegant one, but IMHO it provides a very rock solid foundation for everybody who needs a JavaScript toolkit for DHTML and Web 2.0 tasks.
  • jQuery: This small library is one of the most cool ones I’ve seen until now. It nicely combines the powerful CSS selector and XPath syntax for querying DOM nodes with the possibility to manipulate those DOM nodes through a fully chainable OO-style API. It allows one to script a solution really concisely. At least for Perl hackers like me who love concise code it was a pleasure to work with it. See the fading text in the bottom left corner on the TrainOfThought.org website for a solution based on jQuery. jQuery is certainly worth a look for the real hackers who wish small and concise solutions. And BTW, there is also a nice Interface Elements plugin for jQuery which provides additional support for UI design.
  • Qooxdoo: This widget toolkit really impressed me both from a visual appearance and completeness point of view. The only thing I disliked was that one cannot “just include the source into your website and work with it” as it (for reasons I partly can understand and accept) requires that one really “builds” an application around it. Qooxdoo is certainly worth a look for those who want to build a full Web 2.0 application with a look & feel of a native one.

But just follow the above links and build your own opinion…

4 Responses to “JavaScript Toolkits”

  1. John Resig says:

    Hey Ralf, glad you liked jQuery! Ironically (?) my background is in Perl programming too. There has to be something said for wanting to write short one-liners. ;-)

    Be sure to let me know if you have any questions or concerns, I’ll be happy to answer them.

  2. rse says:

    John: currently I’m just fine and pleased with jQuery. I’ve even hacked already two reusable extensions for jQuery. But feel free to take over already the fixes in jquery.fixes.diff if you wish.

  3. Alberto Marlboro says:

    I´m playing with JS toolkits, but due lack of time to test all of them, I will stick with JQuery by now.

    I started with Perl, but PHP took its place, maybe ROR will be the next.

  4. Ralf S. Engelschall says:

    I’ve these days switched the OpenPKG title page(s) from YUI to jQuery for most of the JavaScript parts. Worked really nicely. jQuery is really cool and as a Perl hacker one can just love it…

Leave a Reply