Dojo vs JQuery, Part 1

Although I had created a few code snippets using Scriptaculous/Prototype, Dojo Toolkit was the first Javascript Framework that I really learned. I had read about (and downloaded) it quite a few years before I actually used it. I purchased a couple of books (Mastering Dojo: JavaScript and Ajax Tools for Great Web Experiences (Pragmatic Programmers) and Dojo: The Definitive Guide) to help me get started. I was working on a project where web pages would be dynamically created. I have to admit, I struggled. Although Dojo is a  “Javascript” Framework, learning it was like learning a new language – before the discovery of the Rosetta Stone. While I was able to learn the basics from reading the books and looking at the examples on Dojo’s website, in many cases, I just could not find the documentation to do what I wanted to do (or how I wanted to do it). So I guessed. And guessed again. And continually guessed until, “Eureka!”. No that didn’t work either…

Remember in the early days of Javascript before a tool like Firebug existed, you would get an error or your code didn’t work and you would have no idea why or how to fix it. When I first began working with Dojo, I felt as if I were starting over. I was a Delphi developer for many years and so I was used to robust debugging and documentation. Although, Firebug handles the debugging, some of the cryptic messages that are displayed from Dojo Toolkit are nearly impossible to figure out (reminded me of some the javascript error messages that were displayed in IE quite a few years ago). And even when I understood what caused the error, I had a difficult time finding any documentation on how to fix it.

Then along came JQuery. I had taken over an Ajax-enabled project that was started by another developer who used JQuery here and there throughout the website. I had heard of JQuery, but I didn’t really know anything about it. I was immediately impressed with what I was able to do. In my opinion, JQuery is a purer “Javascript” Framework – I did not have to learn another language. The JQuery Library extends Javascript by providing “shortcuts” to writing Javascript. While the Dojo Toolkit also offers some of the same shortcuts, it is an animal all to it’s own. In my opinion, JQuery is just an extension of a scripting language (Javascript is a scripting language, not a programming language) while Dojo is becoming an operating system – without providing the necessary documentation.

While I do think that Dojo is must more robust than JQuery (and I will use Dojo to create other websites in the future), I also know that, at this point, I can create Ajax-enabled websites much faster using JQuery. On the other hand, Dojo (as well as YUI) is closer than most open-source Javascript Frameworks to ensuring that the browser will be only operating system needed. What do you think?

Be Sociable, Share!

Checkout My New Site - T-shirts For Geeks