Tuesday, March 31st, 2009

Dojo 1.3 Released along with Plugd

Category: Dojo

We have been using Dojo 1.3 release candidates for awhile on Bespin, and today the Dojo team released Dojo 1.3 just in time for Internet Explorer 8.1 (really? some people believed that? I know that it isn’t quite April Fools……).

There are some nice usable APIs added to base such as:


  1. // create a div.
  2. var n = dojo.create("div");
  4. // create a div with content and styles
  5. var n = dojo.create("div", { innerHTML:"hi!", style:{ height:"200px" } });
  6. // destroy the node safely
  7. dojo.destroy(n);
  9. // place an anchor somewhere, before the node with id="someNodeId"
  10. var a = dojo.create("a", { href:"http://dojotoolkit.org" }, "someNodeId", "before");
  12. // empty the contents of a node safely:
  13. dojo.empty("someNodeId");
  14. dojo.query(".nodes").empty();
  16. // place a new LI in an UL at the first position
  17. dojo.place("<li>Newly created DOM Node</li>", "someUl", "first");
  19. // complex creation in dojo.query. passes through dojo.place
  20. dojo.query("#myNode").addContent("hi there!", "first");

You can also choose between Acme and Sizzle as the engine that powers dojo.query.

Pete also announced Plugd a very cool plugin that “is available as a standalone “dojo.js” replacement (just throw it in your project on top of dojo.js!) or as a 2k adapter to load a bunch of solid additional base API’s. We’ll be continually working to merge the best parts of plugd back into Dojo land, but for the time being they are provided as a separate entity, and are fully documented.”

With plugd you can write code like this:


  1. $("p.baz")
  2.     .appendTo("body")
  3.     .addClass("bar")
  4.     .onclick(function(e){
  5.        e.target.innerHTML = "Wow, JavaScript";
  6.     });

Doesn’t look like Dojo does it? :)

I blathered on about this and some other items when I discusses how Alex and Pete kindly indulged me in a scoping exercise that “should never be used in production!” ;)

Posted by Dion Almaer at 11:44 am

4.3 rating from 48 votes


Comments feed TrackBack URI

“Doesn’t look like Dojo does it?”
No, it looks like jQuery. :)

Comment by MichaelThompson — March 31, 2009

No way. Dojo FOR LIFE. Keep up the good work guys – love the framework

Comment by meeko81 — March 31, 2009

All the major libraries have ended up looking like jQuery. Now they just bicker about who is the fastest. Library authors stopped innovating 2-3 years ago.

Comment by deanedwards — March 31, 2009

@deanedwards: I think that’s unfair. While it may be safe to say they’ve centered on largely jQuery-like patterns (though of course there are some big differences), I wouldn’t say they’ve stopped innovating; they’ve simply stopped innovating their APIs, which is a good thing. It means they’re stable APIs.

Where they’re innovating is in the internals, which is bringing real improvements to their users, with little need to change code. That’s a good thing!

Comment by eyelidlessness — April 1, 2009

I suppose I am being a bit harsh. Sorry JavaScript libraries! :)

Comment by deanedwards — April 1, 2009

Dojo is a great framework, but he has one minus.
I am from Ukraine, and Opera is one of the most widespread browsers
and dojo’s dijit does not support him.
It is a pity.

Comment by ignar — April 4, 2009

ignar, I disagree with you completely.

I have quite a complex appl 100% dojo, and FF, Safari and Opera work really good.. In fact, it’s incredible how they manage correctly lots of things.

IE6 and IE7 are quite bad and Chrome is the top bullshit browser.. Really the worst.

But I guess it will depend of your app and what you are using in it.

Comment by quenenni — April 7, 2009

Leave a comment

You must be logged in to post a comment.