jueves 4 de diciembre de 2008

JAWR

I've been wanting to talk about JAWR for sometime now. For those in the dark JAWR is an OSS project (lead by a fellow Spanish!) that focus on improving the performance of web applications just by serving JS and CSS files. Not impressed? Let's review some of the features the developer gets with minimal to no effort:
  • Debug and production modes
    Many projects end up using an Apache frontend to serve static files. Doing this correctly is far from trivial. A big chunk of the rest just end up serving files without any special tweaking. That imposes an extra load on the server, the network and the client and clearly does not scale very well. JAWR let's the developer completely forget about deployment issues by just modifying a property.
  • Compress, minify & cache for free
    Among the most interesting features JAWR offers is the automatic post-processing of archives. Without a line of code all the files are automatically shrunk improving performance orders of magnitude
  • Bundling
    People have always avoided splitting the JS code in too many files due to the extra HTTP requests required. JAWR automatically concats files in a bundle allowing clean sources with no penalties.
  • Framework integration
    Last version of JAWR added support for Spring MVC. Before was DWR and even before Facelets or Grails. Configuring DWR2 for best performance is difficult (and I know what I'm talking about), JAWR simplifies it so much that it seems cheap. The best news is DWR 3.1 (notice the dot) will probably pack some form or another of JAWR inside. This alone is a proof of the power of the tool
  • I18n in Javascript
    Including i18n messages in JS has always been a pain and no standard API existed so every team had to devise a custom solution. Here's a nice one perfectly integrated with the Java platform (and I expect improvements in this area)
I admit that in my case it was love at first sight and I can't help but recommend it as much as I can. IWebMvc uses it extensively and for a reason. I can't stress it enough, for every developer interested in web performance this tool is a must!

PS.- Sprites...next? One can only hope ;-)