Peter Higgins, former project lead for Dojo, gave an excellent talk at JSConf in 2013 titled “Dojo Already Did That” (which reflected a humorous meme started at the first JSConf). It was highly informative about how Dojo had already solved problems that the JavaScript community were solving again in 2013. Even 3 years later, there are a lot of modern solutions that were solved in Dojo 1.


What problems need to be solved these days have changed from those that originally drove Dojo 1 forward, but we are excited that Dojo 2 will do that again. The problems that Dojo 2 needs to solve today are quite a bit different from almost a decade ago when Dojo 1.0 was first released.

Firstly, there is no Internet Explorer 5.5 (or many other limited browsers). Trying to get a fully functional and rich web application using only the DOM and JavaScript was near impossible. Much of Dojo 1 was putting a layer on top of the browser to get an even playing field. What were incompatibilities and differences a decade ago have evolved into differences of browser release cycles (and the adoption of those newer releases). So there is much less a need to plaster over the cracks as to future proof the code, so you can write it once and have it work efficiently as the inevitable browser upgrade cycle continues.

Doing ES6+ the Dojo-Way

In Dojo 1, there were a lot of patterns that we often refer to as the Dojo-way. While many of those patterns have migrated to Dojo 2, there are new patterns we are developing that we feel are a good way of approaching web applications.

For example, we have been eschewing the traditional concept of inheritance and constructor functions, instead focusing on factories that have more of their functionality expressed as mixins or traits. So instead of new Widget(); you will see createWidget();.

Clarity and intent are also big “Dojo-way” items. It is not useful coming up with a brilliant API to have it not be clear to others what the API does. We are taking cues from other common APIs, so that features of Dojo 2 are familiar and just work.

Big Data JavaScript


Data is core to the enterprise–from collecting large amounts of data from customers, to being able to manage, visualize and action the data within the enterprise. One of the big focuses of Dojo 2 is recognising that data is at the heart of modern applications. Being able to access, correlate and manipulate vast sets of data within a web application is one of Dojo 2’s core raison d’êtres.

Enterprise JavaScript

At SitePen, we have seen many enterprises that have struggled with JavaScript inside their organisations. There are three areas that need focus: people, process and technology. We are excited that not only does Dojo 2 deliver solid technology, but it also helps enable enterprises with the people and the process.

Early on in the plans for Dojo 2, we realised that there were lots of benefits to be had with TypeScript. Originally created as an internal project at Microsoft to make JavaScript manageable at scale, TypeScript is an open source tool that is totally synergistic with the challenges that Dojo 2 needed to help solve. Angular 2 and EmberJS have also joined us in realising that TypeScript helps make code safer and more maintainable.

The concept of enterprise JavaScript though permeates all aspects of the code, not just limited to leveraging something like TypeScript. SitePen has seen those who have used Dojo 1 value the stability and maintainability of Dojo 1. Dojo 2 should be easy to integrate into most build pipelines, whether using Dojo 2 exclusively or with other toolkits and libraries.

Doing the Right Thing


Internationalisation and accessibility are more than a necessary evil. They are principles that computing should be for everyone and that we should remove barriers for all people to access our applications. While enterprises obviously feel this pressure acutely, it is more than just meeting legislative requirements. It is a fundamental ethos of freedom and openness.

Therefore we are really excited that Dojo 2 will continue to deliver and focus on these aspects of applications as well as other features which are often requirements for large scale web applications.

Opinions Welcome (But Not Required)


The way we build web applications has changed dramatically from the start of Dojo 1 to today. As mentioned, it was just a struggle to have a stable base of APIs. Now application architecture has matured and Dojo 1 has struggled in part by being so comprehensive and being the Swiss Army Knife of JavaScript toolkits, having multiple solutions for every problem.

The strong opinions about how to solve problems that guided Dojo 1 are not as relevant today. There are a different set of problems that Dojo 2 needs to have a strong opinion about, to ensure that its packages solve a finite set of problems well. So we are excited that Dojo 2 will have a strong concept of what an application is and how to architect and build that application. This should make it easy for new projects to be built with Dojo 2.

On the other hand, we know that if there is only one pattern that it is unlikely that it would actually fit anyone’s needs fully. Therefore Dojo 2’s packages should largely stand on their own, making it easier to have your own strong opinion about how to build applications.

If you want to know more about where Dojo 2 is at, up to date status information can be found at dojo/meta on GitHub.