You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bastian Voigt <po...@bastian-voigt.de> on 2007/04/12 11:06:19 UTC

How to compress/pack javascript in T4.0

Hi *,
is it possible to have Tapestry deliver javascript in obfuscated / 
compressed / packed form, with the possiblity to switch this feature of for 
easier debugging? 

sth similar to what I mean can be found here: 
http://sourceforge.net/projects/packtag/

thanks

-- 
Bastian Voigt
Neumünstersche Straße 4
20251 Hamburg
telefon 040/67957171
mobil   0179/4826359



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to compress/pack javascript in T4.0

Posted by Jesse Kuhnert <jk...@gmail.com>.
Oh, yes it's technically possible but I don't think it's something I'd ever
add into tapestry core - maybe someone could do it as an add on.

I do of course use the lexical parsing / obfuscation abilities provided by
mozilla rhino via dojo on some of the core content already:

http://dojotoolkit.org/docs/shrinksafe

On 4/13/07, Bastian Voigt <po...@bastian-voigt.de> wrote:
>
> Jesse,
> thanks for the reply. GZip compression is certainly also interesting, we
> will
> have a look into that.
>
> But sorry, this was a misunderstanding. I did not mean gzip compression, I
> meant the kind of thing some ajax frameworks do with js:
>
> - put all the code in a single line
> - rename all local variables to have single-character names (a,b,c,d...)
> - etc.
>
> This is compression and obfuscation in one ;)
>
> Example:
> http://maps.live.com/veapi.ashx?v=1.3.1115150037.31
>
> Is it possible to modify the asset service such that it does these things?
>
> Regards
> Bastian Voigt
>
>
> On Thursday 12 April 2007 15:17, Jesse Kuhnert wrote:
> > Yeah, it sure can (in fact I think we were probably one of the first
> java
> > based frameworks to do it).
> >
> >
> http://blog.opencomponentry.com/2006/12/03/gzip-where-have-you-been-all-my-
> >life/
> >
> > You need to add a regexp pattern to match whatever resources you don't
> want
> > protected here:
> >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/module/ta
> >pestry.asset.html
> >
> > Then whatever resources you reference as tapestry IAsset assets will
> > automatically have various things done to them. (including gzip
> compression
> > where appropriate)
>
> --
> Bastian Voigt
> Neumünstersche Straße 4
> 20251 Hamburg
> telefon 040/67957171
> mobil   0179/4826359
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: How to compress/pack javascript in T4.0

Posted by Bastian Voigt <po...@bastian-voigt.de>.
Jesse,
thanks for the reply. GZip compression is certainly also interesting, we will 
have a look into that.

But sorry, this was a misunderstanding. I did not mean gzip compression, I 
meant the kind of thing some ajax frameworks do with js:

- put all the code in a single line
- rename all local variables to have single-character names (a,b,c,d...)
- etc.

This is compression and obfuscation in one ;)

Example:
http://maps.live.com/veapi.ashx?v=1.3.1115150037.31

Is it possible to modify the asset service such that it does these things?

Regards
Bastian Voigt


On Thursday 12 April 2007 15:17, Jesse Kuhnert wrote:
> Yeah, it sure can (in fact I think we were probably one of the first java
> based frameworks to do it).
>
> http://blog.opencomponentry.com/2006/12/03/gzip-where-have-you-been-all-my-
>life/
>
> You need to add a regexp pattern to match whatever resources you don't want
> protected here:
>
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/module/ta
>pestry.asset.html
>
> Then whatever resources you reference as tapestry IAsset assets will
> automatically have various things done to them. (including gzip compression
> where appropriate)

-- 
Bastian Voigt
Neumünstersche Straße 4
20251 Hamburg
telefon 040/67957171
mobil   0179/4826359

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to compress/pack javascript in T4.0

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yeah, it sure can (in fact I think we were probably one of the first java
based frameworks to do it).

http://blog.opencomponentry.com/2006/12/03/gzip-where-have-you-been-all-my-life/

You need to add a regexp pattern to match whatever resources you don't want
protected here:

http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/module/tapestry.asset.html

Then whatever resources you reference as tapestry IAsset assets will
automatically have various things done to them. (including gzip compression
where appropriate)

On 4/12/07, Bastian Voigt <po...@bastian-voigt.de> wrote:
>
> Hi *,
> is it possible to have Tapestry deliver javascript in obfuscated /
> compressed / packed form, with the possiblity to switch this feature of
> for
> easier debugging?
>
> sth similar to what I mean can be found here:
> http://sourceforge.net/projects/packtag/
>
> thanks
>
> --
> Bastian Voigt
> Neumünstersche Straße 4
> 20251 Hamburg
> telefon 040/67957171
> mobil   0179/4826359
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com