[dojo-contributors] Bootstrap refactoring to reduce bloat and separate package loading

James Burke jburke at dojotoolkit.org
Mon Apr 17 01:34:21 EDT 2006


On 4/16/06, Tom Trenka <ttrenka at gmail.com> wrote:
> A couple of minor comments:
>
> re: bootstrap2 loading before hostenv--although I wasn't involved in the
> original writing of that (I did end up writing a stub for the Adobe SVG
> plugin that was never actually committed, so I have a pretty good idea of
> what's going on), I'd ask: if you are going to load bootstrap2 before the
> hostenv, why not merge bootstrap1 with 2 and call it "bootstrap"?  The only
> reason it was split into two was because the work that needed to take the
> hostenv into account had to happen between the two bootstraps, and if you've
> worked your way past it then I'd eliminate the second file altogether (Alex
> would know a lot more about that).

I would vote to keep the separate to indicate what is really needed to
run dojo vs. the package loading code. I also meant to rename
bootstrap2.js to loader.js but I had issues before with introducing
new files with SVN via a patch, so I thought I would get the changes
pushed, then work out the file renaming (and get feedback on the
naming).

So bootstrap2.js/loader.js should contain all stuff related to package
loading. This means that the functions that are behind dojo.provide
and dojo.require are in bootstrap2.js, and if dojo is going to build a
dojo-lite that does not include the package loading code, it will have
to create a different loader.js file (maybe loader_lite.js? :) It will
need to create some stub functions for things like dojo.provide and
dojo.require. I don't think this was fully fleshed out in IRC or the
wiki, I was extrapolating a little bit, so if I'm off on it, I'm happy
to make changes.

BTW, the I have the xdomain functionality stored in a loader_xd.js
file. For xdomain loading, it will be used in addition to
bootstrap2.js/loader.js.

> [snip]
>
> If possible we will make a decision about ASVG in the very near future but
> as it's only a few lines of code in hostenv_browser, I'd ask that you leave
> it for now.

No problem. Thanks for the info. I won't touch it.

James



More information about the dojo-contributors mailing list