Dojo Porting Guide: 0.4.x to 0.9
Dojo 0.9 is the future of Dojo. It is backwards-incompatible with all previous Dojo releases. This guide outlines all public API changes between 0.4.x and 0.9. In some cases, functions or modules might have been removed. In these cases, alternative ways to achieve the same goal with 0.9 APIs is outlined.
How To Help
This porting guide is a living thing. If you're a Dojo committer and you're working on a module, please get your changes listed here so that others can benefit from them. If you're porting an application and discover things that aren't yet documented (or documented well) in this guide, don't hesitate to ping me (alex at dojotoolkit.org) for editing permissions on the guide to help improve it. In the mean time, please file comments on the guide pages so we don't lose your discoveries and hard-won helpful hints to your fellow Dojo users.
One of the Dojo contributors wrote a very useful blog on this subject you may find helpful, as well: http://wolfram.kriesing.de/blog/index.php/2007/dojo-migration-04-to-09
- Printer-friendly version
- Login or register to post comments
- Subscribe post

Event Topic
Was moved to dojo.publish() and dojo.subscribe(), for anyone who cares.
dojo.declare
Folks,
Need to mention the change to dojo.declare.
The 0.4.x way: The initializer is an element in the class body's associative array using the special key "initializer":
initializer: function() {
// Your initializer code here
},
someMethod: function() {
// Your code for "someMethod" here
}
});
The 0.9 way: It's a third parameter to dojo.declare, not in the class body's associative array, and so it doesn't have a key (as it's not in the array):
function() {
// Your initializer code here
},
{
someMethod: function() {
// Your code for "someMethod" here
}
});
The initializer param is optional. Refer to dojo.declare's documentation for details.
--
T.J. Crowder
tj at crowdersoftware dot com
Really?
I just ported an app to 0.9 and I get warnings if I dont do it like this:
dojo.declare("ClassName", null, {
constructor: function() {
// Your initializer code here
},
someMethod: function() {
// Your code for "someMethod" here
}
});
is the above comment wrong or is it because I am using the svn-head?
cu
Wolfram
It changed
Hiya,
Good catch, it changed between the beta and the release. :-) In 0.9Beta, the initializer was a new third param, but apparently (I've been on holiday and buying a house, so I've been out of the loop lately) before release it went back to being a "constructor" method in the props.
Thanks for pointing that out!
--
T.J. Crowder
tj at crowder software dot com
dojo.widget.tags.addParseTreeHandler
hi,
I recently inherited a dojo code v. 0.4 and i'm suppose to be porting over to 0.9. however i'm getting "dojo.widget has no properties". Can someone help the newbie out. thanks.
Post problems in the forums
Post problems in the forums please. And you need to read that info on porting widgets....
http://dojotoolkit.org/book/dojo-porting-guide-0-4-x-0-9/widget-subsyste...
-Karl
Hi In the version 0.9 we
Hi
In the version 0.9 we have FilteringTable?
thank you
no. there will be one in
no. there will be one in trunk hopefully soon, and definately before 1.0 (end of october estimated)
Has dojo.logging.* been ported over into 0.9?
Hi,
We are using dojo.logging in our application and wanted to know whether it has been ported over into 0.9 or not.
Can someone let me know..
Thanks,
Hiren
on dojo.declare
Hi,
I am a newbie and started with dojo 0.9. I am also using aptana IDE.
The problem I have is that I am not able to import rpc package. dojo.require("dojo.rpc.*") gives me an error in firebug console that __package__.js is not found. I tried the same thing with dojo 0.4 - it is working.
I looked at the porting guide and I do not see any change related to this import. I have also read the short cut from orielly but could not find any information related to this.
Could anyone let me know what is the mistake?
note: The dojo structure has a src subfolder.
Support forums
Please ask for support in the support forums
-Karl
There is no concept of .*
There is no concept of .* for dojo.require (because it was magical and didn't really load 'everything' like people expect from *. dojo.rquire('dojo.rpc.JsonService'); should do the trick for you.
Hi. I can't open this
Hi.
I can't open this blogwolfram.kriesing.de/blog/index.php/2007/dojo-migration-04-to-09 :(
Try this URL
http://wolfram.kriesing.de/blog/index.php/2007/dojo-migration-04-to-09
good luck
cu
Wolfram
Nice topic
Hi, Nice topic. Big Thanks. It was very interesting.
--
sexy prom dresses
Event Topic
Was moved to dojo.publish() and dojo.subscribe(), for anyone who cares My site: tatil köyleri