Dojo

I hesitated about including Dojo. In some ways, it demonstrates how far you can take JavaScript away from the language, which makes it a good demonstration of the flexibility of the language. On the other hand, Dojo demonstrates how far you can take JavaScript away from the language, to the point where much of the simplicity of JavaScript is lost (not to mention some of the built-in DOM functionality).

Dojo really is a mastery of packaging and encapsulation. Much of the functionality has to do with keeping the amount of code loaded into a page to a minimum. Unfortunately, it also makes the code extremely difficult to read.

What sets Dojo apart is its focus on making desktop applications in the browser. It supports a Flash-based storage mechanism, including providing the Flash file used as a container. Two stellar demos of the library are Mail, a simple mail application, and Moxie, a web editor with persistent storage.

Another aspect of Dojo’s library and framework that makes it stand out is its concept of widgets, which we’ll get into later.

Tip

The Dojo Toolkit web site is at http://dojotoolkit.org/. This includes the beginnings of a very nice set of documentation by Alex Russell, at http://dojotoolkit.org/docs/, and a manual at http://manual.dojotoolkit.org/index.html.

Installing and Setting Up Dojo

When you download and unzip Dojo, you’ll end up with a group of directories and files. Just as with previous frameworks, you’ll include dojo.js in your Dojo-enabled application, ...

Get Learning JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.