Dojo 1.7 / ADM / Performance

This is really nice.  I have been using dojo 1.6 for 6 months now.  I'm not using a CDN, so I'm serving the dojo toolkit from my web server.  It's a really small project, so I never set up a "build", but with dojo 1.7, I don't think I will need to.  The new AMD Loader will only load the dojo code that I need.  Sweet.  And it manages name conflicts so you can easily use other javascript frameworks.  Nice.

EDIT: I've now ported my project pretty easily to dojo 1.7 using a CDN.  Now I'm trying to use the define and require syntax to make my modules work with asynchronous modules (ADM).  I'm also using namespace.js, but I don't know if it is really needed now.

EDIT 2:  I had some "global" style javascript functions and variables.  Now I have converted everything to ADM.  There was some good re-factoring going on.  I still have some tightly coupled modules, but at least most of my modules are self contained and reusable.  So the re-factoring for dojo 1.7 ADM loader was nice, but I did not get the performance gains I was expecting.  I am now looking at downloading the SDK and doing a build to minify/concat to get better performance.

I ripped out namespace.js.  I didn't see a need for it anymore with the ADM modules.  Also I should note that the port to dojo 1.7 was easy.  The port to ADM loader was not, but I have much more OO code now which is good.

Comments

Popular Posts