Saturday, October 6, 2007

AJAX and Bandwidth Savings

One of Solidcore's components is developed using Google Web Toolkit (GWT). GWT was introduced about 2 years ago and allows developers to develop web applications using Java. Though Java was used for server-side development even before its introduction, GWT pioneered the concept of a java-to-javascript compiler that allows developers to develop and debug in Java using their favorite IDE and tools. The compiler is used to convert the code into javascript which can then be deployed on an application server. Click here to know more about GWT and if you've already played with GWT and want to meet the team behind this innovation, you may want to register for this event

Our GWT application is extremely user-friendly and uses AJAX to provide a great experience to the user. I had never imagined that such functionality could be delivered through the web browser! Not only is the user experience better, there are some ancillary benefits like bandwidth savings. By obviating the need for full page refreshes, AJAX helps reduce the amount of traffic. This article uses simple examples and does the math to explain how large-scale web applications can derive significant cost savings. However, the best is yet to come. Our application results in a single javascript file, which together with gwt.js, is nearly 150KB in size. If we could optimize this to fetch the javascript functions on-demand, we could make the startup times faster and further reduce the bandwidth. Here's an excellent article describing this in case you are curious about how this can be done.