Notes on Popular JavaScript Frameworks, Libraries, and Toolkits, Part 1

Filed under

Although my JavaScript development focus is currently on the Yahoo! User Interface Library (YUI) I do try to keep up with some of the other libraries. Here I'll begin to offer up my recent notes and observations on five popular projects, Dojo, Ext JS, jQuery, Moo Tools, Prototype/Scriptaculous, and YUI.

What about <insert JavaScript library here>?

This is a fair question often asked while reading "comparative literature." According to other blog posts on the subject, Google, benchmark test results, and web development job ads, the projects covered here have garnered more attention from the web development community than others.

JavaScript Projects According to Google

Last month Google gave an endorsement of sorts to jQuery, prototype/, MooTools, and dojo by offering hosting of each through their AJAX Libraries API. Any web developer in the world can now easily include the latest stable version of these libraries in their projects. I can't think of much higher praise for a project than a nod from Google. These projects can tout their selection and, more importantly, the benefits of Google serving as their CDN hosting service.

Google probably isn't going to host a competitor's library, even if Yahoo! didn't provide hosted versions of the YUI. I'm also guessing that the commercial component of Ext JS's dual licence ruled them out from the AJAX Library API.

Google Trends has become the latest judge in web popularity contests. Here's a Google Trend comparison of each project's web site:,,,,

I initially included MochiKit with the others but it did not fair well. MochiKit is a well-established project with many merits and deserves an honorable mention here. Some will also note that the YUI isn't included. Yahoo! uses instead of a dedicated subdomain for the YUI. The Google Trends report only showed data for

JavaScript Library Usage on Popular Sites

Pingdom, a server monitoring service, recently posted the results of a simple study of JavaScript framework usage among top websites. They chose to scan the HTML source of site home pages listed on the Alexa US Top 100 and the Webware Top 100 Web Apps. They searched for specific keywords and file names associated with the use of Prototype, JQuery, MooTools, YUI, Dojo, ExtJS and MochiKit. The study includes a list of sites they found using each and basic summaries of the libraries (Note: My next post will expand on these summaries).

The study didn't find evidence of Dojo, Ext JS, or MochiKit in use on the site's home pages but the results should not be considered conclusive. I suspect that Ext JS usage would score quite high in a survey of corporate intranet sites. Ext JS provides formal training and support services which are typically valued in corporate IT environments. In regards to Dojo, I suspect that the recent announcement of their partnership with the Zend Framework will produce a spike in its usage after the 1.6 release of the Zend Framework later this summer.

JavaScript Size and Performance Benchmark Tests

Performance benchmark tests based on general and randomized cases may seem to provide a smoking gun when choosing one framework over another, but be careful. Regardless of the tester's reputation or methods, these tests weren't run against your application in your environment. Ahh, those darn variables always get in the way of simple calculations ;) Tests may reveal advantages in one framework but ultimately performance is determined by a framework coupled with your design ingenuity, coding skill, and infrastructure.

PBwiki recently conducted a JavaScript library performance benchmark test that caught the interest of jQuery's creator, John Resig (for reasons that'll become more obvious in the next sentence). Of the libraries tested, jQuery did very well. Dojo and YUI were neck and neck in the middle of the pack. Prototype by itself was comparable to YUI and dojo but as soon as Scriptaculous was added to the mix, Prototype's performance seems to have suffered greatly. On his blog John provides a summary of the test results and emphasizes why you shouldn't trust random-user-generated performance tests. I wouldn't choose a library for a project solely on the numbers but I would likely cite poor results to discount one.

JavaScript Libraries in the Eyes of Employers

This aspect is of particular interest to those of you in the job market. If you're looking to expand your skill set, here are the JavaScript libraries that says employers are looking for in their job ads.

Prototype produced skewed results for obvious reasons and Prototype js didn't produce any results.

Obviously this is just a cursory comparison. I'm currently spending some time with each project to provide a more thoughtful description of each. In the meantime, what were the deciding factors when you chose a specific library?