Let There Be Dojo

May 29, 2010 by Ken · Leave a Comment 

While I will certainly make attempts to throw in general JavaScript tidbits where appropriate, I expect that much of my blogging related to client-side JavaScript will be specifically geared towards development using the Dojo Toolkit.

Over the past 15 months, I’ve been fortunate enough to have the opportunity to become acquainted with Dojo.  I read a decent chunk of Dojo: The Definitive Guide, which repeatedly impressed upon me how well-crafted parts of Dojo Core and Dijit are; it’s quite apparent a lot of thought went into this stuff.

After I spent some time getting my feet wet in actual code, I began hanging around the #dojo channel on freenode (circa July ’09), and was rather surprised at how quickly I was able to start helping other aspiring Dojo users.  As time passed, I noticed a few things…

  • Many newcomers have the same questions/problems, often stemming from unfamiliarity with a new library (and perhaps with JavaScript in general).
  • Quite a few questions answered in the IRC channel are worth persisting for future reference to others who might want to do something similar.

Somewhere along the way, the following unrelated point also sunk in.

  • Dojo needs more exposure.

I certainly don’t mean to belittle what material is out there for Dojo (see Further Reading at the bottom of this post), but let’s face it: generally, when you look around online, most of what you see is jQuery this, jQuery that, how to mow your lawn with jQuery (okay, I’d bite on that one).  More than once, my super-supervisor has asked me, “why are we using Dojo?  Why not jQuery?  It seems like people like it and it’s pretty usable.”

Let’s clear this up right now: I don’t really have anything to hold against jQuery, and I certainly don’t intend to start a flamewar.  In fact, I’ve only used jQuery minimally myself, which is a great reason for me to STFU right now.  I can certainly see why people are attracted to it – it makes it easy to do simple things in a concise manner, and it’s augmentable.  (One thing I do take issue with in general is the attitude I sometimes see wherein some users become complacent relying on a particular toolkit, and never take an interest in truly understanding JavaScript, but that’s another story.)

But to answer the question posed by my boss’s boss, Dojo offers far more power straight off the starting line, and where I’m working, we need that power in our web applications.  Sure, you’ve got a zillion jQuery plugins floating around the web that might get you somewhere close to where you want to go, but if you build a RIA off of that, you’ve potentially got a mishmesh of various programming styles and degrees of code quality backing your UI.  Dojo Core and Dijit, on the other hand, are rather cohesive, more or less comprehensive (and extensible), and diligently maintained.  There are a number of strong projects in Dojox as well, many of which I’m unfortunately not familiar with yet.

At the same time, Dojo inherently operates in a dependency-based modular fashion, possesses a powerful inheritence framework, establishes reusable APIs for interfacing with various types of data storage, and comes with the ability to roll your own custom builds optimized to the needs of your applications.  These are very nice things to have out of the box, when you already have plenty of things to worry about on your own time.

Anyway, to get back to where I was four paragraphs ago, I get the feeling that Dojo is rather underexposed, considering its merits, and I’d like to help spread the word.  I’ve been nothing short of amazed by the level of support afforded by many Dojo contributors to IRC and mailing-list visitors alike; I’d like to think I’ve been of help myself on the IRC channel at least.  But I figure it’s about time I put a foot forward and got something (hopefully) visible out there on the interwebs to help raise awareness.  I won’t claim that my contributions are worth much at this point, but I’d like to think every little bit helps.

Before I close out this second “I can’t believe it’s not code” post and get on with it, I’d just like to throw in a disclaimer or two.  Firstly, I intend for anything I write here to be of my own creation, or at least in my own words; if I knowingly pull significantly from other sources, I intend to give credit where credit is due – it’s likely that readers would be interested in the related material anyway.  Throw me a comment if you think I’ve skimped you on credit – most likely I either legitimately screwed up, or it’s a fun coincidence (in which case I might link to you anyway).

One more disclaimer, while I’m at it:  here’s a general rule for my posts.

If you see something, say something

Billboard spotted in Ottawa during winter 2005 visit. Always stuck with me - who could forget a penguin in acid-trip swim trunks?

Feel free to comment if you have tips to add or revisions to suggest; I’ll try to work them into posts where appropriate (and give credit of course).  I’m certain that my code/advice won’t be perfect and certainly shouldn’t be taken as gospel, or with alcohol (questionable), or while driving (this is true).

Further Reading

Rather than pepper links throughout posts like a sugar-rushed lunatic suffering from ADD, for the most part I intend to collect links in a section like this at the end of my posts.  It’s supposedly better for readability anyway.

The Dojo Toolkit:  http://dojotoolkit.org

Sources of Dojo documentation:

Other major sources of Dojo knowledge:

Blogs of other Dojo users/developers: (I expect this list to be grossly incomplete – drop me a comment if you should be here!)

Speak Up