[dojo-contributors] Dojo 1.7 Goals: has() and granular dependency lists

Bill Keese bill at dojotoolkit.org
Sun Mar 13 08:00:51 EDT 2011


2011/3/12 Kris Zyp <kzyp at dojotoolkit.org>

>  There are a couple of additional overarching goals that I would like to
> see pursued in 1.7. First, we should start using the has() pattern for
> feature detection branching in our code. Here is the ticket for (and
> explaining) this enhancement:
> http://bugs.dojotoolkit.org/ticket/12431
>

Sounds good, events.js might be a good place to start as that has a lot of
browser specific code.   I just hope you don't bloat the code base too much
for users that aren't doing browser-specific builds (ie: all of our current
users).    There's also an execution-speed concern, especially since your
version of the has() tests don't cache the results.

The related thing question is, how would a user do a browser specific build?
  AFAIK there's no tool to extract out the has() tests scattered across each
source code file, run them all, and then save the results for each browser.


>
>
> Second, as our AMD support will be improved in 1.7, we should start using
> more precise dependency lists to facilitate highly optimized builds (only
> what is needed) and fewer runtime property lookups:
> http://bugs.dojotoolkit.org/ticket/12432
>
> I don't think the entirety of the Dojo codebase necessarily needs to be
> upgraded to these two coding improvements, but we should try to perform
> these upgrades when possible on code that is actively maintained or
> developed, or heavily used modules.
>

Precise dependencies is on the dijit list too, although it's hard to tell
what a file's dependencies are since everything in dojo/_base maps to the
same "dojo" namespace.

If anyone has a tool to "fix" the dependency list for our files that would
be cool.




>
> Also, if anyone is interested here is patch for adding a module for
> supporting native JSON parsing (using the techniques listed above):
> http://bugs.dojotoolkit.org/ticket/8111<http://bugs.dojotoolkit.org/ticket/8111#comment:22>
>
>
I looked at the patch briefly, but it's confusing/scary.    You doubled the
size of dojo/_base/json.js and added a new file dojo/json.js which is also
pretty big, although mostly comments.   What's going on there?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20110313/0fbf6292/attachment.htm 


More information about the dojo-contributors mailing list