Jeffrey Greenberg on Technology Strategy

Infomation technology futures and strategic thinking

Jeffrey Greenberg on Technology Strategy header image 2

Development Mojo with Dojo

May 17th, 2007 · No Comments

I’ve been working on a variety of startups and they all need prototypes on the way to built systems. Being rather strategic these days (though I hasten to add that I’ve written operating systems and the like), I took the opportunity to get my hands a bit dirty with a detailed look state-of-the-art development choices for the web.

Besides the backend LAMP backend choices (in which I include RoR) and the final mass awakening to the MVC pattern, the biggest item is how to write effective, dynamic interfaces. (I’ll leave the backend technology choices for another day. ) That solution is currently Javascript and DOM/HTML which has been evolving and improving. Nonetheless, browser implementations remain inconsistent and a developer has to tackle that in creating web pages that will work for all users. You can either roll your own or find a decent library to write browser-portable code. The best practice these days is to use a library.

For me this breaks down into the following requirements:

  • Does it come with a baseline set of widgets, and are they:
    • Extensive
      Attractive
      Customizable
  • Portability across leading browsers: FF, IE, Opera, Safari
    • Portable widgets
      Covers javascript implementation issues
      Covers DOM implementations issues
  • Web 2.x ish support
    • Ajax-ish data exchange via JSON etc
  • Other pluses
    • Open Source
      Support Obsfucation
      Download only parts you want
      Easy to use
  • Special Requirements
    • Portable graphics

One way to meet most of these requirements is to use the Prototype library which provides portable extensions to Javascript, and then add to that a Javascript widget library like Sciptaculous or JQuery. There’s other solutions too like Mochikit, Rico, Yahoo’s YUI and others. But you get the whole thing with Dojo, Open Source with an active community. There are definitely differences in the number and quality of widgets in Dojo versus say Scriptaculous and JQuery (which are generally prettier). And you can mix and match, but you’ll start to get into issues with the amount of javascript you are downloading to your customers.

These are best out there: Dojo (most comprehensive), Prototype/Scriptaculous/JQuery, YUI, or combine them. There’s still tons of issues with all of these for the state of the art is pretty primitive but for an initial development these are no brainers. Keep in mind that these are evolving platforms. A large refactoring of Dojo is going on as I write this.

The recommended browser debugging platforms are: Firefox with the Firebug debugger, and for IE use JSLint and the Microsoft debugger tools and you’ve got what you need. (Avoid Venkmann debugger, Firebug is far better).

Graphics
Graphics are the bleeding edge these days. The only portable library with any substantial support for graphics is Dojo. Dojo’s implementation is an abstraction that is built on top of SVG and VML (The canvas tag is not used which is particular to Safari). Apps requiring primarily basic line and geometric rendering can avail themselves of some other libraries, though, broadly speaking, these currently tend not to support text, gradients, and other fancier curves. A good library of this ilk people are using is by Walter Zorn.

Highly graphical web pages are coming but are subject to development issues due to the terrible performance of VML under IE. So while graphics are inevitable, the devil is in the details: you’re going to face a lot issues. One hopes that Microsoft will prioritize fixing this aspect of IE rather high. This is an area where Microsoft could innovate and challenge FF (which will be happy to do battle here I’m sure).

Tags: Technical