The Dojo Toolkit Book

Update 06/07/2011: I must just add that DOJO has improved a hell of a lot since I wrote this post and some of the info here is a bit outdated (although most of it is still relevant). jQuery library is slightly smaller than DOJO! – When you download and look at the filesize your get jquery-1.6.2.min.js is 89.4kb and dojo-1.6.1.min.js is 92kb (compressed). jQuery has sexier looking syntax than DOJO! – This ones a personal opinion of mine… a very subjective observation! (but check the code below and you will see why!). Consider this JavaScript snippet, which uses simple string functions:var value = "Hello" + name ", it's " + time + " o'clock";value.replace(".", ":");. Even simple string functions are harder in DOJO:dojo.require('dojo.string.substitute');var newstring = dojo.string.substitute("Hello ${name}, it's ${time} o'clock", { name: "Horst", time: new Date()});. I agree with an earlier comment that you can’t really compare jquery to dojo, as you, yourself, mentioned; because the dojo toolkit book they are intended to solve varying degrees of complexity… People mistakenly associate simple syntax with elegance, instead of looking at the big picture. The truth is that jquery, while popular and easy, seems to, nonetheless, promote spaghetti code when used in any serious type of application. Because of the shortsightedness that many who start using jquery have, the propensity is toward snippets of script tags littered throughout the application, making it very difficult, from a maintenance perspective, and frequently leading to both a fear of making changes, and extending apps, and a very understandable hesitance to maintain such an encoded app/webpage!. It is a shame seeing a framework with an excellent foundation (well engineered!) such as Dojo losing community attention, which leads to the symptoms mentioned here (bugs, lack of community support, dev. tools, etc.). Dojo perception around widgets, data management and data binding provide very elegant separation of design and logic programming. Can anyone come up with similar concepts (by example please) around widgets with JQuery?. Maybe if you compare jquery with dojo core without adding any dojo.requires (not to mention those in dijit and dojox) it might be superior. Just barebones dojo with jquery (there is no such thing as barebones jquery because jquery is already barebones!) But when it comes to design patterns, Dojo is superior. Checkout wiki comparison of frameworks or what you can do with it such as the ArcGIS Javascript framework, which is built on top of Dojo.Mu conclusion is that jquery is just popular but when it comes to scalability, maintenance and mastering, dojo is the right tool for me. Here’s a dojo one liner for the sake of one linersdojo.query('select').attr('disabled',true);Does seem shorter than jquery. Hmm. “dojo.string.substitute” is a base for javascript templating systems. This is a PLUS for Dojo, not the opposite!Point 5 (more plugins) is a con for me due to tedious searching for the right one as a lot are bad coded (and they rarely work flawless).Point 11 doesn’t need consideration.jQuery is a basic library while Dojo is a complete framework.Last but not least: jQuery’s selector engine is Sizzle and Sizzle is made by Dojo!.