Google Closure

View: New views
9 Messages — Rating Filter:   Alert me  

Google Closure

by XMaNIaC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

Regards

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Kenton Smeltzer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On the same line is there a reson Dojo does not use the optional naming of functions e.g postCreate : function postCreate() instead of postCreate : function()? I know it is redundant but It is my understanding that this convention survives compressions and obfuscation it would be nice to have this information for deeper debugging.

On Fri, Nov 6, 2009 at 3:13 AM, Jose Noheda <jose.noheda@...> wrote:
Hi all,

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

Regards

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Miguel Coquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The anonymous functions really are a pain in the rear when using Firebug's profiler.

On 2009/11/06, at 11:52, Kenton Smeltzer wrote:

On the same line is there a reson Dojo does not use the optional naming of functions e.g postCreate : function postCreate() instead of postCreate : function()? I know it is redundant but It is my understanding that this convention survives compressions and obfuscation it would be nice to have this information for deeper debugging.

On Fri, Nov 6, 2009 at 3:13 AM, Jose Noheda <jose.noheda@...> wrote:
Hi all,

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

Regards

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Nathan Toone-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You can use closure with any javascript code - including Dojo.  I ran a quick test, and was able to get it working.  However, I only spent a few minutes on it - so there may be issues that I did not encounter.

Basically, you can use the dojo build process to build a layer that contains all your javascript - but don't use shrinksafe.  Then run the resultant file through closure compiler.

-Nathan

On Fri, Nov 6, 2009 at 1:13 AM, Jose Noheda <jose.noheda@...> wrote:
Hi all,

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

Regards

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Nathan Toone-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I haven't had any problems with this using firebug 1.5...I know that some versions of firebug 1.4 had problems resolving anonymous functions - but it seems to be fixed now.

-Nathan

On Fri, Nov 6, 2009 at 4:58 AM, Miguel Coquet <mcoquet@...> wrote:
The anonymous functions really are a pain in the rear when using Firebug's profiler.

On 2009/11/06, at 11:52, Kenton Smeltzer wrote:

On the same line is there a reson Dojo does not use the optional naming of functions e.g postCreate : function postCreate() instead of postCreate : function()? I know it is redundant but It is my understanding that this convention survives compressions and obfuscation it would be nice to have this information for deeper debugging.

On Fri, Nov 6, 2009 at 3:13 AM, Jose Noheda <jose.noheda@...> wrote:
Hi all,

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

Regards

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Dustin Machi-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The running of compiler against the code is the relatively easy part.  
Getting it to know what should be stripped out and figuring out how to  
do that across an app is the hard part.   In general I think this can  
be incorporated easiest with single page apps (and thats what google  
uses it for in mail and other apps), using across layers/multiple page  
apps is going to be a bit more challenging.

Dustin



On Nov 6, 2009, at 8:56 AM, Nathan Toone wrote:

> You can use closure with any javascript code - including Dojo.  I  
> ran a quick test, and was able to get it working.  However, I only  
> spent a few minutes on it - so there may be issues that I did not  
> encounter.
>
> Basically, you can use the dojo build process to build a layer that  
> contains all your javascript - but don't use shrinksafe.  Then run  
> the resultant file through closure compiler.
>
> -Nathan
>
> On Fri, Nov 6, 2009 at 1:13 AM, Jose Noheda <jose.noheda@...>  
> wrote:
> Hi all,
>
> Anyone already trying the Closure compiler and Closure Inspector  
> with Dojo? Debugging obfuscated Dojo would be such an improvement!
>
> Regards
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest@...
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest@...
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Parent Message unknown Re: Google Closure

by Adam Peller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 6, 2009 at 6:52 AM, Jose Noheda wrote:
Anyone already trying the Closure compiler and Closure Inspector with Dojo?
Debugging obfuscated Dojo would be such an improvement!

Haven't tried closure yet but, fwiw, Shrinksafe also keeps a table of its renamed symbols, so it may be possible to standardize on such a tool.  There's no way to get it from the command line, but it's available programmatically from the compressScript() method.

-Adam




_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Deno Vichas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I’ll second that!

 

From: dojo-interest-bounces@... [mailto:dojo-interest-bounces@...] On Behalf Of Miguel Coquet
Sent: Friday, November 06, 2009 3:58 AM
To: dojo-interest@...
Subject: Re: [Dojo-interest] Google Closure

 

The anonymous functions really are a pain in the rear when using Firebug's profiler.

 

On 2009/11/06, at 11:52, Kenton Smeltzer wrote:



On the same line is there a reson Dojo does not use the optional naming of functions e.g postCreate : function postCreate() instead of postCreate : function()? I know it is redundant but It is my understanding that this convention survives compressions and obfuscation it would be nice to have this information for deeper debugging.

On Fri, Nov 6, 2009 at 3:13 AM, Jose Noheda <jose.noheda@...> wrote:

Hi all,

 

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

 

Regards


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

 


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: Google Closure

by Robert Peterson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is it preferred over shrinksafe? What are the trade offs and differences?

Thanks,
Robert

On Fri, Nov 6, 2009 at 12:42 PM, Deno Vichas <dvichas@...> wrote:

I’ll second that!

 

From: dojo-interest-bounces@... [mailto:dojo-interest-bounces@...] On Behalf Of Miguel Coquet
Sent: Friday, November 06, 2009 3:58 AM
To: dojo-interest@...
Subject: Re: [Dojo-interest] Google Closure

 

The anonymous functions really are a pain in the rear when using Firebug's profiler.

 

On 2009/11/06, at 11:52, Kenton Smeltzer wrote:



On the same line is there a reson Dojo does not use the optional naming of functions e.g postCreate : function postCreate() instead of postCreate : function()? I know it is redundant but It is my understanding that this convention survives compressions and obfuscation it would be nice to have this information for deeper debugging.

On Fri, Nov 6, 2009 at 3:13 AM, Jose Noheda <jose.noheda@...> wrote:

Hi all,

 

Anyone already trying the Closure compiler and Closure Inspector with Dojo? Debugging obfuscated Dojo would be such an improvement!

 

Regards


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

 


_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest