One thing I don't like about Dojo
Dojo is one of the best, most used and most popular AJAX and JavaScript toolkit out there. They have brought software engineering to the browser space, and I applaud them for it. There is a downside to it though.
Because Dojo wants to do everything, it is huge. It requires its own build system and one dojo.js file is possibly quite different when compared to another. As a framework user, I just want the .js file, include it and start using the thing. With Dojo that is not how it is done. Either you assemble your own dojo.js, and from there start using it, or include the bohemoth 150kb JavaScript file.
I'm not against downloading that 150kb, nor am I afraid that any of our customers might notice the download. It is only done once in the session, or when you set your headers correctly, once per day or even week. Most of our applications get deployed on corporate intranets, so the delay is hardly noticable.
This is all understandable and workable. I'm not a fan of assembling my own thing, so I just use the standard Ajax distribution and be done with it.
The build process and packaging of the dojo.js library is also its downside. It is impossible to actually debug anything inside a packaged dojo.js. And worst of all, a packaged dojo.js file still tries to include external files. The whole idea of a packaged dojo.js file is that it is standalone. Yes most browsers will ignore the missing files and continue as advertised, but on OS X, Safari stops evaluating JavaScript code when __package__.js files are missing. Why does dojo want to include those files? Here is the list of files, files marked in bold are reported missing.
- file:///wicket-examples/src/java/wicket/examples/preview/__package__.js
- file:///wicket-examples/src/java/wicket/examples/preview/behaviour.js
- file:///wicket-examples/src/java/wicket/examples/preview/dojo.js
- file:///wicket-examples/src/java/wicket/examples/preview/Home.html
- file:////wicket-examples/src/java/wicket/examples/preview/login/Login.html?dojo.transport=xmlhttp&
- file:///wicket-examples/src/java/wicket/examples/preview/src/__package__.js
- file:///wicket-examples/src/java/wicket/examples/preview/src/io/__package__.js
- file:///wicket-examples/src/java/wicket/examples/preview/wicket-preview-behaviour.js
- file:///wicket-examples/src/java/wicket/examples/preview/wicket-preview.js
So what is the one thing I don't like about dojo? It is just too damn complex.