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

Tom Trenka ttrenka at gmail.com
Mon Apr 17 01:18:46 EDT 2006

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).

re: Adobe SVG plugin: I was the one that added that code to hostenv_browser
(although I didn't write the adobesvg stub, that was Dylan), and I think
we've made the decision to not support that plugin for dojo.  However, I'd
ask that you keep that code there for now, and let me or Dylan remove it in
the near future (if called for)--since we're the ones working primarily with
SVG, and it's very possible that we may decide (for some odd reason I can't
think of now) that we *have* to support ASVG somehow (god forbid).

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.


On 4/16/06, James Burke <jburke at dojotoolkit.org> wrote:
> Below is the ticket (with patch file attached to ticket) for the
> bootstrap bloat work:
> http://dojo.jot.com/WikiHome/BootstrapBloat
> 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.
> James
> ---------- 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.
> Remove?
> * 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
> addOnLoad.
> 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
> http://dojotoolkit.org/mailman/listinfo/dojo-checkins
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20060417/cc19cc8e/attachment.htm 

More information about the dojo-contributors mailing list