[Dojo-interest] multi-version legacy 1.6 and 1.7+

bod.zak bod.zak at gmail.com
Thu Mar 7 13:22:04 EST 2013

I've been looking at different options our company may need in future to
co-exist packages of different versions.
Co-existing multiple AMD versions is straightforward however I'm confused
about co-existing legacy, specifically 1.6 and AMD versions.

I've tried this previously with legacy versions less than 1.6, this worked
though not using the means described in the tests e.g.

This may not be a good idea but what I did was include 2 dojo.js (or
loaders) files; 1 legacy and 1 AMD. This worked because up until 1.6
require/define wasn't part of the loader, the pattern i used was include
dojo 1.4 or 1.5 first then configure dojoConfig again setting async:1 and
noGlobals:1, I then used packageMap config to name the packages
dojo17/dijit17/dojox17 (though I'm sure that isn't really needed in this
scenario), then I script included dojo.js again (with the AMD loader).

This kept old and new code nice and separate but this isn't possible with
1.6 (and a 1.7+ version). Looking at the
confuses me, I'm not sure how this would work. I'd need to use legacy sync
mode (and old dojo syntax dojo.require etc) but can't work out how I'll be
able to load different versions of packages.

Is it the case I need to use a built version of 1.6 in order for it to work
properly (I'm using 1.6 source with 1.8 source)?

I'm trying to map packages to dojo16 and dojo18, this isn't working for me
so far. I also see the lib/backCompat module in 1.6. Is this something I
should be loading?

I'll do some more digging tomorrow but wanted to know if there are any
examples of 1.6 and 1.7/1.8 multi-version? I'd also prefer to use AMD
require/define for new code rather than using legacy for all code, is this
even possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20130307/920b1915/attachment.htm 

More information about the Dojo-interest mailing list