This project is not covered by Drupal’s security advisory policy.

Dojo Toolkit (http://www.dojotoolkit.org) is a Javascript platform that goes beyond JQuery to add full browser-side data objects in addition to a huge variety of other goodness.

This is an API module to support loading Dojo from a CDN or a local build. It is now being targeted at the most recent versions of Dojo, 1.7+, with Asynchronous Module Definitions (AMD).

By itself, this module does very little besides loading Dojo Core. Other modules may define module paths for their own AMD modules, and there is built-in support for adding some dynamic options to a dojoConfig global, as well as bootstrapping your Javascript inside an initial require().

At this point, the functionality is extremely limited, but we have several projects that are funding development so expect to see progress here very quickly.

What works now:

  • Loading Dojo on all pages
  • Function to require any desired Dojo modules, necessary for declarative markup
  • Function to add Javascript and requires to the head of the page
  • Hook to define dojoConfig properties, including module paths
  • Drush script to download release as a library
  • Configuration options to require any desired Dojo modules and run onload scripts

See this blog post for a quick primer: http://www.freelock.com/blog/john-locke/2012-05/quickstart-using-dojo-to...

In short, it is now possible to very easily load Dojo/AMD scripts asynchronously and bootstrap Javascript applications.

Coming soon:

  • Documentation
  • Services module integration, to support dojo.store
  • Support for plugging in Dojo Editor into WYSIWYG module
  • Field widget support
  • Drush script to support creating Dojo builds
  • Views display for Dojox Charts
  • Solidify API to make more useful/reliable for other modules.

At this point, do not count on this code for any production use unless you have experience with Dojo Toolkit and Drupal development. We are likely to change the API drastically before reaching a stable release. API has changed drastically with spring 2012 work, and if you were using this before, your scripts will likely break on upgrade. We are developing for both Drupal 6 and Drupal 7.

D7 note: Drupal 7 supports a lot more functionality for altering script loading behavior, and so this module is considerably simpler in D7. The port is brand new, and not yet in use in production anywhere, so I have not tagged a release yet. Please feel free to try it and file an issue if you see anything broken -- due to the workarounds the D6 version has to do, I think the D7 version is probably more reliable -- it's certainly going to have fewer conflicts with modules like jquery_update and jquery_ui.

Project information

Releases