Wednesday, November 02, 2005

AJAX Mania

Oflate, the "ajax" is in the limelight. The technology has created so much excitement among the web developer community and eventually is conferred with laurels. Some of the accolades received are "The next big thing", "revolutionary web technology", "web2.0", etc. The technology indeed has a potential and some applications have leveraged and demonstrated it. The most famous and often cited are the google maps, gmail, flickr.

Recently, rediffmail rolled out a new version of their web mail that offers some goodies implemented using ajax - mail preview, instant download of attachments, drag drop unwanted mails to trash, auto suggest of email ids while composing a mail, etc. It is now pleasure to use rediffmail with all the ajax goodies.

We have an ajax implementation in our product to retrieve information at lower levels from a hierarchically organized data, on click of expand/collapse (+/-). The existing functionality retrieved all the data at once, dumped the data behind the div tags and the selected div would be made visible using javascript. This worked fine for smaller amounts of data and for large data, apparently, became a bottleneck in terms of retrieval and rendering times. Subsequently, the issue has been resolved by implementing ajax. When someone suggested the ajax solution to our chief architect, he suggested some concerns and asked us to explore more for an optimal solution:

1. Browser compatibility - there should be a utility to check for the compatibility of the browser for ajax to serve the ajaxified and no-ajaxified versions accordingly.

2. Increase in the server hits for every ajax call

3. Feedback mechanisms during ajax calls and appropriate messages on the screen

4. Processing order of the ajax calls

5. The change should have a least impact on the existing functionality/code and should be maintenable.

These concerns were very realistic and very soon we realized that ajax is not a panacea. The final solution used ajax at only certain points where it added value. My request to fellow developers and friends is not to get carried away by the excitement, understand the true potential of the technology and implement it at a place where it makes sense.

No comments: