Javascript - Who wants a compression utility?
When it comes to Ajax apps you can quickly discover that your Javascript code is the major part of your application.
For example my current project is heavily Ajax'ed and contains 4500 lines of Javascript for a tiny 100 lines of HTML and 200 lines of Java server code (excluding libraries). Something like 2% HTML, 4% Java and 96% Javascript!
DWR contains a Javascript compressor and various other Javascript utilities. (You can take a look at the source through CVS at java.net). I put it together becuase I didn't know of any other Java based Javascript compressors under ASF-like licenses, and it occurs to me that other people might find it useful. I can see it being wrapped in an Ant task or as a Servlet Filter.
The question is "Would you like a free one in Java?", is it worth someone's time taking my code and packaging it separately? Please comment if you would use it or if you want to take the Javascript code from DWR and maintain it yourself.
Other languages
For the record I've found Javascript compressors in various languages:
Web based:
- http://www.creativyst.com/Prod/3/
- http://www.dithered.com/javascript/compression/
- http://rumkin.com/tools/compression/compress_huff.php
- http://javascript.about.com/library/blcrunch.htm
- http://javascriptcompressor.com/
- http://www.brainjar.com/js/crunch/demo.html
I'm sure there are a hundred more web based ones, given freely available Javascript based compressors, it's not like it's a hard page to write. Talking of which:
Javascript Based:
.Net Based:
Commercial: