Login Register

Dojo: What Is It?

Dojo is an Open Source DHTML toolkit written in JavaScript. It builds on several contributed code bases (nWidgets, f(m) and Burstlib), which is why we refer to it sometimes as a "unified" toolkit. Dojo aims to solve some long-standing historical problems with DHTML which prevented mass adoption of dynamic web application development.

Dojo allows you to easily build dynamic capabilities into web pages and any other environment that supports JavaScript sanely. You can use the components that Dojo provides to make your web sites more useable, responsive, and functional. With Dojo you can build degradeable user interfaces more easily, prototype interactive widgets quickly, and animate transitions. You can use the lower-level APIs and compatibility layers from Dojo to write portable JavaScript and simplify complex scripts. Dojo's event system, I/O APIs, and generic language enhancement form the basis of a powerful programming environment. You can use the Dojo build tools to write command-line unit-tests for your JavaScript code. The Dojo build process helps you optimize your JavaScript for deployment by grouping sets of files together and reuse those groups through "profiles."

Dojo does all of these things by layering capabilities onto a very small core that provides the package system and little else. When you write scripts with Dojo, you can include as little or as much of the available APIs as you need to suit your needs. Dojo provides:

  • Multiple Points of Entry - You can start using Dojo at the level you are most comfortable with. For example, expert JavaScript programmers can use the foundation capabilities to be more productive quickly, while Web designers and developers can use the set of easy to use, modify, and extend components that make their applications more responsive without requiring them to learn a large JavaScript API. This fundamental design decision drives the layered implementation of most of the major capabilities of Dojo.
  • Interpreter Independence - Dojo is squarely a JavaScript toolkit but, within the realm of JavaScript interpreters and environments, not everything was created equally. Dojo supports at least the very core of the system on as many JavaScript enabled platforms as possible. This allows Dojo to serve as a "standard library" for JavaScript programmers as they move between client-side, server-side, and desktop programming environments.
  • Forward Looking APIs - No one has a crystal ball when it comes to what technologies will be broadly available or used in 5 years, but Dojo attempts to provide APIs that are generic enough to be (directly) useful with todays capabilities while still building in room for future improvement. The dojo.io.bind() interface is a great example of this principle: when first written it wrapped only a single Transport class, but now provides a normalized interface to many ways of receiving and sending data from JavaScript enabled environments.
  • ReducingBarriersToAdoption - This core philosophy behind Dojo's design acknowledges the fact that tools which are hard to use just won't get used, no matter how good they are. Dojo should be built in every way (licensing to deployment) to not give users any reason to not trust or use Dojo for the tasks it's good at. Many of the project's overall decisions get made on the basis of this principle.

Dojo is being built around a single markup language that provides application authors a (more) simple way of declaring and using responsive DHTML interface components. Renderings can be made available in several rendering contexts (such as SVG, or perhaps even the desktop or Flash), but the markup language (DojoML) and scripting language (JavaScript) will not change. Better yet, the DojoML parser accepts extended HTML and SVG as valid input, and can be used to easily create Degradeable Responsive Applications.

Dojo's homepage is: http://dojotoolkit.org.