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

James Burke jburke at dojotoolkit.org
Sun Apr 16 17:47:07 EDT 2006

Below is the ticket (with patch file attached to ticket) for the
bootstrap bloat work:


See the *important* notes below for things that I did differently than
what was described above.

Paul Sowden, can you review? If anyone else wants to review it, I'm up
for that too.


---------- Forwarded message ----------
From: dojo <trac at dojotoolkit.org>
Date: Apr 16, 2006 2:41 PM
Subject: [Dojo-checkins] Re: [dojo] #627: Bootstrap refactoring to
reduce bloat and separate package loading
To: dojo-checkins at dojotoolkit.org

#627: Bootstrap refactoring to reduce bloat and separate package loading
 Reporter:  jburke                  |        Owner:  jburke
     Type:  defect                  |       Status:  new
 Priority:  normal                  |    Milestone:  0.3release
Component:  Core                    |      Version:  0.3
 Severity:  normal                  |   Resolution:
 Keywords:  bootstrap package load  |
Comment (by jburke):

 I created a patch for this work. If it looks good, then I will apply it to
 the trunk. I created the patch by doing a svn diff against my version of
 trunk (r3562).

 If possible, I would like to have Paul Sowden review the patch, but I
 welcome feedback from anyone on it. Some notes about the patch vs. the
 work that was described on the wiki page:

 * bootstrap2.js now loads before the hostenv_*.js file.

 * Put the addOnLoad stuff into bootstrap2.js, and the methods that back
 require and provide. This means for a dojo-lite that it would have to
 provide stub functions for this functionality.

 * Kept dojo.hostenv.conditionalLoadModule and removed
 dojo.kwCompoundRequire. There were lots of references to
 conditionalLoadModule in __package__.js files, and these files also use
 dojo.hostenv.moduleLoaded(). It seemed odd to have dojo.kwCompoundRequire
 paired with dojo.hostenv.moduleLoaded().

 * docscripts/parser.php: has a reference to dj_deprecated. Also, it is
 looking for dojo.hostenv.kwCompoundRequire, but it should just be
 dojo.kwCompoundRequire (but I removed that method now anyway).

 * Removed requireAfterIf and used requireIf instead. However, I kept the
 requireAfterIf function defintion since it was used in a bunch of widgets.
 Didn't want to remove it yet, since I figured someone would holler (if
 they had done a copy/paste from the old code).

 * Kept dojo.loaded() for now.

 Stuff I didn't do, but might be worth considering.

 * hostenv_adobesvg.js: affected by changes, but I don't think adversely.

 * hostenv_browser.js: 1st part parses the query string to look for
 djConfig parameters. Is this used by anyone?

 * hostenv_browser.js: 3rd part does browser detection and sets variables
 off of dojo.render. There is one block that is concerned with detecting
 Adobe SVG. Can it be removed? Look for the comment: // check for ASVG

 * Didn't try to convert dojo.exists to dojo.evalObjPath. Anyone else want
 to give it a shot to see if they are interchangeable (just got lazy).

 * bootstrap2.js: addedToLoadingCount: is modified by never read. Remove?

 * bootstrap2.js: removedFromLoadingCount is modified by never read.

 * dojo.hostenv.setModulePrefix and dojo.setModulePrefix. It would be nice
 to just go to dojo.setModulePrefix, but the hostenv version is mentioned
 extensively in docs.

 * Lots of test files push into modulesLoadedListeners directly instead of
 using dojo.addOnLoad. It would be nice to change everyone to use

 I'll upload the patch to this ticket.

Ticket URL: <http://trac.dojotoolkit.org/ticket/627>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit
Dojo-checkins mailing list
Dojo-checkins at dojotoolkit.org

More information about the dojo-contributors mailing list