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

Page 3 of 4

Mapping
Most of us will continue to use the big mapping libraries for standard jobs like showing street addresses. But what if you want to do something a bit different, such as change the rendering or fiddle with the layers in ways that the big libraries don't allow?

Tile5 can pull the mapping tiles from such sources as GeoCommons, then lay them out so that the user can shove them around just like the maps from Google, Mapquest, or Yahoo. But there are other opportunities: The animation operation can change any of the parameters of the display. This is usually used for panning across the map and landing in one spot, not unlike the sequences in the Indiana Jones movies showing the plane flying over the map.

Pixel manipulation
If there's any indication that HTML5 is not focused on words and static images anymore, it's projects like Pixtastic, a JavaScript library that offers many of the basic features we've come to expect from Photoshop. Serious Photoshop users may be forgiven for rolling their eyes, because the more sophisticated features are nowhere to be seen. But there's enough to satisfy any casual editor of pixels.

There's a surprisingly large collection of pixel-level operations available, including the ability to tweak the colors and apply filters like the ones used to blur images or compute edges. The basic library is now several years old, but Jacob Seidelin continues to create examples of how it can be applied -- like this small Web application called Filterrific.

Mobile libraries and browser books
As the mobile browsers begin to dominate the Web, it becomes more and more important to package the information in a form that's easier to browse on smartphones and tablets. That's not so easy when the fingers are fat and the eyes can't focus on small fonts.

jQuery Mobile, Jo, and Sencha Touch are three libraries that offer touch-friendly menus that dig down into data structures and present the information for the small screen.

The iPad may be nice for reading, but its corporate masters demand a hefty percentage of the selling price for the privilege of being on the platform. A number of savvy programmers are writing text-reading tools that fit in the browser, allowing publishers to deliver directly to the iPad without paying the Apple tax or going through the Apple censorship gauntlet.

Treesaver creates magazine-like layouts that allow you to flip through pages of text and images the old fashioned way. The code is small -- just 25K -- and released under both the MIT and GPL license.

The Baker Framework is a similar project with a slightly different aesthetic approach. While Treesaver wants the text to flow into a convenient layout for the page, Baker assumes a constant width to make life easier for designers. Both of the tools make it possible to deliver booklike content directly from the Web.

Local databases
It's easy to forget that cookies can store 4,096 bytes of data. You would never want to store that much because each cookie is bundled together with subsequent trips to the server -- that's why local databases were invented. Taking advantage of them is getting easier as new libraries simplify the details of interacting with the API.

HTML5SQL, for instance, will feed relatively simple SQL statements to the database, allowing you to create tables, fill them with data, and then query them. You'll spend more time crafting your SQL than your JavaScript.

If you don't want to think in SQL while writing JavaScript, TaffyDB accomplishes much of the same tabular querying with JSON, and the queries and the updates can be chained together.

| 1 2 3 4 Page 3
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.