[dojo-contributors] Env specific builds?

Kris Zyp kzyp at dojotoolkit.org
Fri Mar 4 13:07:25 EST 2011


Absolutely, we've been working on this extensively lately. This thread
discusses some of the mechanics of our approach to branching such that
builds can create using has() branching for to enable build time
optimizations based on feature sets:
http://comments.gmane.org/gmane.comp.web.dojo.devel/13600

And some of the projects with concepts and/or code that will be
leveraged by Dojo include has.js's has() pattern for feature detection,
RequireJS and Backdraft's support for analyzing has() branches in
builds, recently I've also been putting together an optimization tool
that leverages these features to create browser-specific builds based on
the known set of features for each browser, and providing the necessary
runtime user agent branching to these builds in sync with the build
process: https://github.com/kriszyp/ua-optimized.

We should start converting our code to using the has() pattern in 1.7.
Backdraft's builder should also be integrated in 1.7 as well, and this
should make the ua-optimized tool viable for focused builds in our next
release. The degree to which our browser-specific builds can be slimmed
down to the bare essentials will be dependent on the extent to which we
can switch to has() branches through our code, but hopefully we can get
a lot switched over.

We have also been working on how we could make our code more readily
compressible using closure's advanced compression to eliminate unused
code paths, which could provide even further minimization of code for
specific browsers:
http://permalink.gmane.org/gmane.comp.web.dojo.devel/13900

Also, note that these won't be Dojo core or Dijit specific
optimizations. Any AMD package that uses the has() pattern could
leverage this toolset.

Thanks,
Kris

On 3/4/2011 10:18 AM, Thomas Aylott wrote:
> Ahoy Dojo pals,
>
> Has there been any thought on delivering focused builds that only include code for the current environment? E.g. Don't deliver the IE6 fixes for Firefox
>
> I'm considering doing something like that for Slick.js
>
> It could be very hip if each browser received a highly tuned build with no unnecessary logic or bug fixes.
>
> Thanks
>
> — Thomas Aylott / SubtleGradient.com (from iPhone 4)
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



More information about the dojo-contributors mailing list