The Server-Side Pad

by Fabien Tiburce, Best practices and personal experiences with enterprise software

Archive for November 2007

GZIP Compression for Improved Page Loads

leave a comment »

All modern browsers support GZIP compression (by sending a header to the server, Accept-Encoding: gzip). Enabling gzip server-side for HTML and XML significantly reduces the footprint of the server response which in turns improves the page load-time (latency). It also saves bandwidth costs. The cycles required to zip the response server-side and unzip it client side, are more than offset by the savings in bytes transmitted. In Tomcat 5.x, this is simply a matter of declaring gzip compression for the connector node in server.xml.


Written by Compliantia

November 15, 2007 at 4:56 pm

Compress your Javascript and CSS files using Yahoo’s YUI Compressor

with one comment

The YUI Compressor from the Yahoo UI Library is an effective and easy to use compressor for js and css files. By eliminating white spaces and shortening local variables, I have found the tool compresses files by as much as 50%. This is particularly compelling for large web properties. Smaller downloads translate into bandwidth savings and lower page latency. Translation: costs less and makes users happy! The compressor comes as an executable jar file whose commands are easily included in an Ant deployment script. This seems preferable anyways since while the compressed files have smaller footprints, they are not particularly legible. Compressing at deployment time allows developers to continue working with a original, human-readable files.

Written by Compliantia

November 15, 2007 at 4:24 pm


leave a comment »

JSON (JavaScript Object Notation) is a fast-rising data interchange format. As such it is an alternative to the XML format for data interchange. Unlike XML, JSON is a subset of the Javascript language. While JSON has a smaller footprint than XML, its most compelling advantage is that JSON sets are Javascript arrays. This is particularly advantageous to Ajax-rich pages where the page controller is typically a Javascript event. A basic but functional implementation of JSON in Java is available on the site.

Written by Compliantia

November 14, 2007 at 8:07 pm

RSS/Atom Publishing Made Easy

leave a comment »

Rome is an easy to use and configure Java library for creating RSS and Atom feeds. As with all such libraries, Rome lets developers write feeds using a simple object model. Rome is responsible for producing the feed compliant XML. The product supports several flavours of RSS and Atom.
While Rome works well as a servlet, large web properties are probably better off producing feeds as a scheduled batch or background thread and saving them to the local file system for a web server to handle. This allows the application server to focus on what it does best (serve dynamic requests) while delegating the serving of static content to web servers.

Written by Compliantia

November 14, 2007 at 7:55 pm