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 4 of 4

Server-side processing
The JavaScript libraries are traditionally aimed at the browser, but this is often just half of the problem. If you're going to write an AJAX call to the server, you need something at the server to field the request and compose a response. A number of libraries come with both client and server components that work in synchrony.

Both SAJAX and XAJAX are built for PHP. After you create a PHP function and register it on the server, the JavaScript code can call it and receive the results. It's an ideal way to add functionality without refreshing the entire page for each change.

Some of these libraries go a bit deeper. PHPLiveX, for instance, offers an integrated file uploading feature and some intelligent caching to improve performance. A number of libraries take this same approach, and of course some are more integrated with the standard libraries than others. jQuery-PHP is such an option for those who want a plug-in for jQuery.

There are good server-interaction libraries for almost every platform. Direct Web Remoting offers Java stack lovers the chance to call Java code on the server from the client with some security to prevent arbitrary calls. The code also includes a channel for the server to push some information to the clients that are logged in, a useful feature for broadcasting new information.

Many of these libraries offer a similar combination of code that lives on both ends of the connection, but nothing is as extreme as the Google Web Toolkit. All of the GWT code is written in Java and compiled into JavaScript to run in the browser. Pyjamas does something similar for Python programmers.

Debugging tools
One of the biggest challenges for JavaScript programmers is building larger applications, and bigger always means more debugging. While you can get by with embedding alert statements in smaller pages, larger ones require more structure for the debugging information.

Firebug, an extension for Firefox, offers an elaborate debugging platform, including conditional breakpoints and the ability to edit the state. The JavaScript can write directly to the console object with three levels of severity.

Blackbird is a stand-alone library that pops up a separate console window that looks quite elegant. You can set four levels of bugs and the user can turn the messages on or off. A profiler is ready to time the routines on the local browser.

Facing the future
The new features under the umbrella of HTML5 are both a blessing and a curse for any JavaScript programmer. They offer so many tantalizing new methods, but they're not all supported by all browsers.

Modernizr is mainly a collection of tests that checks to see what features are supported in the current browser. It's a simpler way to take advantage of the new while supporting the old. Most of the tests simply create a DOM object and see whether it accepts the commands.

This collection of JavaScript libraries only scratches the surface because a wide collection of translators and emulators makes it possible to run practically any language in your browser. Pyjamas is a rich development platform built around a Python-to-JavaScript compiler. The Google Web Toolkit converts Java into JavaScript, and RubyJS converts Ruby. The list of languages that can be emulated is long, and practically nothing is out of reach. Rather than continue to list them, I'll just link to a Gameboy emulator to prove the point.

This article, "Beyond jQuery: JavaScript tools for the HTML5 generation," was originally published at Follow the latest news in software development, languages and standards, JavaScript, and HTML at For the latest business technology news, follow on Twitter.

| 1 2 3 4 Page 4
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.