Beyond jQuery: JavaScript tools for the HTML5 generation

Here are three dozen JavaScript libraries tuned for mobile devices, Canvas-based animation, HTML5 video, local databases, server interaction, and more

Over drinks, one person proclaimed, "No one programs in JavaScript, they just string together jQuery calls." This statement is certainly not true, but like a hand grenade, it gets close enough to make its point.

jQuery sure seems to be everywhere, and with good reason: Its creators took all of the neat ideas from libraries like Prototype, Dojo, and Yahoo's YUI, then turned them into something that was just a tad easier to use. When jQuery nurtured fertile plug-in culture, the library became irreplaceable. One seemingly random estimate claimed that at least 70 percent of JavaScript is jQuery. While there is probably no scientific way to make such a blanket statement, the fact that someone would try is good enough.

[ Also on InfoWorld: The great JavaScript debate: Improve it or kill it? | 13 essential programming tools for the mobile Web | JavaScript conquers the server | Get software development news and insights from InfoWorld's Developer World newsletter. ]

In the midst of all of this success, it's easy to forget that plenty of other JavaScript libraries are worth checking out. Some do much the same thing as jQuery, simplifying the basic chores of manipulating the DOM on all of the different browsers, while offering their own advantages. They may not be better, but they're different, and sometimes that's worth celebrating.

The Yahoo User Interface Library, for example, was one of the first big, cross-browser toolsets released as open source, and it remains one of the biggest and most fertile. Yahoo started version 3 in 2009, and both versions 2 and 3 continue to get better. The collection of charts, widgets, and other tools has more variety than almost any other JavaScript library. Yahoo has also devoted more attention to cosmetic issues than some of the others. Many of the features that drive Flickr and Yahoo Mail are here and waiting for your glue code.

Like jQuery and YUI, MooTools offers nice, browser-independent shorthand for manipulating arrays, divs, spans, and whatnot. My favorite part continues to be the custom library construction tool that lets you select the functions you want. Check some boxes and get an entirely optimized version of MooTools with just the functions you need and none of the bloat you don't. That's lightweight.

A number of other libraries offer newer features -- for animation or data visualization or server-side processing or other niches -- or different ways of thinking about life in the browser. To get a close look at some of these newer options, I unpacked a number of libraries, wrote a few lines of code, instantiated a few objects, and pushed some code through a few browsers.

Animation and HTML5 game engines
One of the stated goals of HTML5, at least for some groups, is to replace the Flash plug-in, the gold standard for making sprites and letters dance across the screen. This change is slowly coming as the game industry and the presentation industry start to duplicate some of the sophisticated tools available in the Flash universe.

Mashi is an impressive example of how the sprites can be set in motion. It offers more than several dozen standard easing functions for moving sprites along a timeline.

1 2 3 4 Page
Join the discussion
Be the first to comment on this article. Our Commenting Policies