Back to blog
JavaScript Dojo Toolkit: Dojo 1 Gets Patches, Modern Dojo Gets Features

JavaScript Dojo Toolkit: Dojo 1 Gets Patches, Modern Dojo Gets Features

Developer comparing legacy and modern codebases

Dojo Toolkit is an open-source, modular JavaScript toolkit that began as an all-in-one framework. Maintained legacy Dojo 1 and a separate modern Dojo successor both exist, and new development centers on the modern line. To act right away, open the official tutorials to learn the basics, or head to the download index to grab a release.


TL;DR:

  • Dojo 1 receives maintenance patches rather than new features; modern Dojo uses TypeScript and a different architecture, so migration requires staged conversion and testing.
  • The listed latest stable release is 1.17.3; archive the exact version your legacy application uses instead of relying on a floating CDN URL.
  • For Dojo 1 demos, set dojoConfig to async mode before loading dojo.js, and use an HTTP server because browsers block module requests from local files.
  • Use dojo for core utilities and loading, Dijit for interface widgets, and DojoX for specialized additions such as charts and grids.

Table of Contents

How did the javascript dojo toolkit start, and where does it stand now?

Dojo started as a comprehensive toolkit for building cross-platform web applications. Instead of asking developers to stitch together a dozen small libraries, it shipped the DOM helpers, Ajax calls, events, widgets and a module loader in one coherent package.

According to Wikipedia's entry on Dojo), the ecosystem splits into three parts: dojo (the core), Dijit (the widget library) and DojoX (extensions). That split still shapes how you read the documentation today.

The maintenance posture matters before you invest time. Dojo 1 is maintained for legacy users, receiving patches rather than new features, while feature work is focused on modern Dojo. Treat Dojo 1 as a stable, aging toolkit and modern Dojo as the forward path.

What do dojo, Dijit, and DojoX actually contain?

The official API documentation and the reference guide map each package to specific responsibilities. Knowing which package owns what saves a lot of searching.

  • dojo (kernel): the AMD loader, configuration, language utilities, DOM utilities, event handling, dojo/request for Ajax, deferreds and promises, data stores, the parser and the router.
  • Dijit: the widget suite, with form controls (dijit/form), layout containers (dijit/layout), themes, internationalization and accessibility support built in.
  • DojoX: extra modules that sit outside the core, such as dojox/charting and dojox/grid, plus mobile-oriented components.
  • dojo/query and DOM helpers: CSS-selector querying and node construction, handy when you only need page manipulation.

As a rule of thumb, reach for dojo when you need plumbing, Dijit when you need ready-made UI, and DojoX when neither covers a specialized need like charts or data grids. Each package has its own section in the reference guide, so you can read only the part you need.

Why do some teams still keep Dojo?

The main draw is a unified API surface. When the loader, DOM tools, widgets and i18n all come from one project, you rely on fewer ad-hoc dependencies and fewer version mismatches between libraries that were never designed to meet.

Dojo also anticipated patterns that are now common in JavaScript. Deferreds for asynchronous work, a module system, widgets, internationalization and accessibility were all present early, which, as the Dojo project blog suggests, helps explain its staying power in some enterprise apps.

There is a trade-off worth knowing. The reference guide describes an architecture where the loader, core, widgets and themes are meant to work together. That coherence simplifies whole-app assumptions, but pulling out a single piece for reuse elsewhere costs more effort than with loosely coupled libraries.

Why do some teams still keep Dojo? — overview diagram

How do you run a Dojo 1 example step by step?

The official downloads page shows a CDN script tag for loading dojo.js, and the tutorials walk through the AMD pattern. Here is the shortest path to a working page:

  1. Create an HTML file and add a <script> tag pointing to dojo.js, using the CDN example from the download page or a local copy.
  2. Define dojoConfig in a script block before loading dojo.js, with async: true so the loader runs in asynchronous AMD mode. Dojo reads this object once at startup, so setting it afterward has no effect.
  3. Call require(["dojo/dom", "dojo/domReady!"], function(dom){ ... }) to load modules and wait for the DOM.
  4. Inside the callback, change the page, for example dom.byId("greeting").innerHTML = "Hello Dojo!";.
  5. Serve the folder over HTTP with any simple local web server, not by opening the file directly with file://, because the loader fetches modules with XHR requests that browsers block on local files.
  6. Use define([...], function(...){ return ...; }) when you want to package your own code as a module.

Pro Tip: Pin an exact Dojo version in your script URL instead of a floating one, so an update can never change behavior under a legacy app.

Which small tutorials teach the most?

The Dojo tutorials are short and hands-on. Pick the ones that match what you want to build.

  • Hello Dojo! and AMD modules: teaches require, define and dojoConfig, the foundation everything else rests on.
  • DOM functions (dojo/dom, dojo/dom-construct): shows how to find, create and change page elements without a separate DOM library.
  • Events with dojo/on: covers wiring click and keyboard handlers, plus publish/subscribe messaging.
  • Ajax with dojo/request: explains requests and how deferreds and promises handle the asynchronous result.
  • Declarative syntax with the parser: lets you place Dijit widgets in HTML markup and have Dojo instantiate them.
  • Effects and dojo/fx: a quick way to see animation helpers in action.

A sensible order is AMD basics first, then DOM, then request, and finally the parser and widgets. Each step builds on the previous one.

Where do you download Dojo, and why pin a release?

The Dojo download index lists release archives, including source, demos, and both compressed and uncompressed packages. It identifies 1.17.3 as the latest stable release in the reference material we reviewed.

The artifact types serve different jobs. Compressed builds suit production, uncompressed builds help when you step through code in a debugger, and the full source package is what you keep for long-term maintenance.

For a legacy application, download the exact release you depend on and store it with your project rather than trusting an undated CDN URL. That way a rebuild years from now produces the same behavior.

How does modern Dojo differ, and what does migration take?

The modern Dojo site describes a TypeScript-based framework with a different architecture from Dojo 1. Dojo 1 is written in JavaScript on AMD with its own loader semantics, while modern Dojo offers component-oriented APIs, routing, state management, accessibility-focused widgets, and CLI and build tooling.

Dojo 1 and modern Dojo architecture comparison

That gap is why migration is rarely mechanical. A community discussion from 2018 notes that moving from Dojo 1 is non-trivial precisely because modern Dojo uses TypeScript instead of JavaScript and AMD. A GitHub issue on the Dojo site makes the same distinction: treat the two as different products that share a name and a lineage.

Practically, expect the widget model to change, the build pipeline to change, and the loader assumptions to change. Budget for architectural conversion and a round of testing, and treat it as a rewrite you do in stages. Where a migration is not justified, keeping Dojo 1 pinned and tested is a legitimate choice.

Where does Dojo still show up in production?

Dojo tends to survive in places where applications are large, long-lived and heavy on forms and data. Typical examples include enterprise dashboards, GIS and mapping tools, and internal line-of-business apps with dense input screens.

Its widget library and built-in internationalization were attractive for corporate teams in the years when those features were hard to assemble elsewhere, and applications built then have kept running. When one coherent toolkit already covers an app's loader, widgets and data handling, the maintenance friction of staying put can be lower than the cost of rebuilding.

Keep expectations realistic: that longevity reflects past adoption and inertia more than current momentum. For a new project with no legacy constraint, weigh modern tooling first.

Where can you find official docs and community news?

Bookmark these places before you start, since they cover reading, downloading and staying informed.

Check the blog and community before upgrading anything, since that is where release changes and advisories show up first.

What would we do first with Dojo?

If you maintain a legacy app, preserve the exact release you run and invest in tests before touching anything else. For a new project, start with modern tooling unless you need Dojo 1 compatibility. In both cases, begin with a small experiment. Pin a release, run the Hello Dojo! tutorial, and estimate the migration cost with a real page rather than a guess. If you also run experiments on page performance, our notes on fast website scripts cover why payload size matters.

— Juan

Test faster without heavy scripts

If you came to Dojo because you maintain a large front end, you already know how much each script adds to a page. We built Stellar around the opposite idea: a lightweight script and a no-code visual editor, so you can launch A/B tests on a landing page without a developer or a toolkit migration. Our free Sandbox plan costs $0 per month, and paid plans start with Plus at $29 per month. See the plans at Gostellar and run your first experiment today.

FAQ

What is Dojo Toolkit in JavaScript?

Dojo Toolkit is an open-source, modular JavaScript toolkit for building web applications. According to Wikipedia, its ecosystem is organized into dojo, Dijit for widgets, and DojoX for extensions.

Is Dojo deprecated?

Dojo 1 is not abandoned, but it is in maintenance mode. It receives patches for legacy users, while new feature development is focused on modern Dojo, the successor line described on the Dojo site.

Is Dojo still used?

Yes, mainly in long-running enterprise, mapping and forms-heavy applications that were built on it years ago. For new projects, most teams evaluate modern tooling first unless they need Dojo 1 compatibility.

What is the difference between Dojo and Dojo Toolkit?

The names overlap. Dojo Toolkit usually means the original Dojo 1 line, written in JavaScript on AMD, while modern Dojo is the TypeScript-based successor with a different architecture, as the project site explains.

Sources