[dojo-contributors] Fwd: Using Dojo 1.6 with Closure -- document attached

Bill Keese bill at dojotoolkit.org
Wed Mar 2 22:37:14 EST 2011

Stephen - wow, that's quite an accomplishment that you actually got this
working.   Especially dealing with the renaming of class lattributes.   A
few months ago I converted some of our modules to jsDoc format and tested
closure compiler (see the jsdoc/ branch in SVN) but you've gone much

First, I'd suggest that you join the dojo-contributors mailing list if you
aren't on it, so that we can talk about your work.   You won't be able to
reply to any email without doing that.

Then (as Adam suggested, but you probably didn't see), it would be great for
you to file tickets with patches for the trivial changes you made like
changing "addClass"/"removeClass" --> toggleClass.

After that, some issues are:

  - In 1.6 much of the source code was converted to use define() rather that
dojo.require().   That doesn't affect you because the build converts
define() back to dojo.require().   However, that backwards-conversion won't
happen in 1.7+.

  - In 2.0 we plan to make classes anonymous.    This will affect both how
classes are declared:
            dojo.declare([baseClass, mixin1, mixin2], {...})     // first
argument gone
 and how classes are instantiated:
             new Dialog()     // no dijit. namespace

The first change can be solved with jsdoc code comments using @name.   The
second one is harder.

And then some questions:

  - How does using closure compiler compare to  Rawld's bdbuilder?    That
apparently has dead code removal too, both for dead branches and unused
methods.   I don't think it renames class attributes though.   Although
possibility would be for you to add your code (the part that helps rename
class attributes) into his builder.

  - This brings back the discussion of our API comment formatting for 2.0,
whether we use our proprietary format or the standard JSDOC format.    And
which variation of JSDOC, the official or google version?   And if we use
google's version of jsdoc, how do we annotate multiple inheritance?  (Also,
how do we generate our API documentation?)

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

>  Stephen Chung has been researching the possibility of using Closure's
> advanced mode on Dojo to create highly compressed builds that eliminate dead
> code, and shorten property names. Attached is a document detailing his
> results. This could be very helpful in guiding our decisions about how to
> achieve extremely compact Dojo applications.
> Thanks,
> Kris
> -------- Original Message --------  Subject: Using Dojo 1.6 with Closure
> -- document attached  Date: Tue, 1 Mar 2011 13:06:57 +0800  From: Stephen
> Chung <Stephen.Chung at intexact.com> <Stephen.Chung at intexact.com>  Organization:
> Intexact Technologies  To: Kris Zyp <kzyp at dojotoolkit.org><kzyp at dojotoolkit.org>
>  Hi Kris,
>  I have put together a TODO document (attached) detailing how to use Dojo
> 1.6 with the Closure Compiler.
>  Please help take a look, and perhaps put in on somewhere that people who
> wants to know how to do this can get some references.
>  Thanks!
>  - Stephen
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20110303/bb0a9671/attachment.htm 

More information about the dojo-contributors mailing list