Posted by Nicholas on August 12th, 2006
Preface
Dojo is a currently very popular JavaScript framework. On its own Wiki, it defines itself as an open-source DHTML toolbox written in JavaScript. Dojo aims to be a "unified" toolbox, not just at the browser level—it has quite ambitious goals. However, Dojo brings some new ideas to JavaScript programming, and the introduction of a package mechanism for dynamic loading is a pretty good concept.
Understanding Dojo's Package Mechanism
In fact, Dojo only needs a small amount of loading code to load its various packages. The dojo.js file provided in the Dojo-ajax download on its official website is still relatively large because it includes some commonly used packages within the JS file. However, we often don't need so many features, so it's better to load them on demand.
Fortunately, at the address http://download.dojotoolkit.org/, we can also download various custom versions of Dojo. The components included are the same, but the size of dojo.js varies greatly. So, let's start with the minimal version.
After downloading, you will find that the dojo.js in the minimal version is only 18kb in size, and it only contains a few basic... (the sentence seems incomplete, but this is the translated portion based on the provided content).