Just a little side note: After a beta-release and some dojo.offline preview releases (including dojo 0.9) in July Dojo 0.9 has finally arrived. For everybody who’s not up to date: Dojo 0.9 completly breaks backward compatibility and tries to break new ground. This should mean:
- Much smaller and therefore faster and more concise
- No more multi-platform support (after realizing that the browser is and will be the most important platform for dojo)
- No more API-magic
I personally appreciate this new direction. Dojo 0.4 really was slow concerning the page load (also with custom builds). Dojo really forced developers to write long names (dojo.event.topic.subscribe). And Dojo was really big and hard to overlook. But has Dojo 0.9 adressed this issues successfully?
I’ve already ported 2-3 libraries to Dojo 0.9 and basically: yes!
I love the fact, that the core and widgets got splitted. I love the new and concise API (dojo.subscribe instead of dojo.event.topic.subscribe). But I’m not always happy with the chosen fat they’ve decided to reduce.
For example I’ve usually set up all the needed inheritance using dojo.inherit. But dojo.lang.inherit has gone - dojo.extend or dojo.define should be used. On the one hand thats really bad, because now I have to change the structure of every “class” in order to port the application to Dojo 0.9. On the other hand this is also something good, because of this change I’ve learned that dojo.define is a very nice and powerful method. So, I think I’m fine with the API changes.
Regarding the performance improvements I don’t have any results yet - but this probably will be very interesting as well.
One thing I really miss: djConig.debugAtAllCosts = true. This feature has gone in Dojo 0.9! I’ve read in the Dojo forum that Fireclipse is able to debug in evaled code, but I don’t want that! I want to be able to debug my code directly within my browser with Firebug. And I don’t want to create a custom build where a single JS file includes the code all the time just to be able to debug. I really hope that this gets added back.
And finally: I hope that the “before” and “around” advice of dojo.connect will show up within dojox soon.
I created a fix in dojo for the debugAtAllCosts problem:
@dojo.js:95
if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!isRhino))
{
tmps.push(”browser_debug.js”);
tmps.push(”loader_xd.js”);
}
Create a file in dojo/_base/_loader called “browser_debug.js” with contents:
dojo.writeIncludes = function()
{
for ( var i=0; i”);
}
}
And all your dojo.hostenv.writeIncludes becomes
dojo.writeIncludes
Comment by Scott on Fri, 07.09.2007 - 22:11
K that didn’t come out right… copy the source from dojo 0.4’s writeIncludes function from browser_debug.js
Comment by Scott on Fri, 07.09.2007 - 22:12
[...] some of this was a ’surprise’ to me, even after reading the same sorts of findings on other blogs and the official guide, so I’ll share this [...]
Pingback by Porting Dojo 0.4 -> Dojo 0.9 the Journey by jpsykes on Thu, 13.09.2007 - 5:22