Sunday, January 29, 2006

Some thoughts on AJAX

Had a conversation with a customer recently on AJAX.
Without telling me what the had AJAX in mind for, they wanted to know whether AJAX would generate more load on the server and network components (firewall, loadbalancers, proxies, etc) than "regular web applications".
The (admittedly very techy) answer was a definite "depends".

That's the funny thing about AJAX: compared to what we could to with plain old JavaScript and HTML (may I just call it POJAH??) the possibilities now seem unlimited.

In the POJAH days, when you wanted to do some server assisted form-validation or (auto-)completion you had to do some magic with hidden frames - yuck. Maybe you wanted to fill in the city based on the ZIP - you simply did not load all possible cities with a JavaScript table in the main document - way too large.
Now this is totally easy, there are 100s of examples around.
Does this increase the server load: NO, because you had the ZIP request anyway - using the hidden frame.
If you do Java on the server, you might start here.

Then again, if you send (almost) each and every JavaScript/DOM onmouseoever event to the server, you bet your firewall admin will call you (and you better hide...)

The major advantage of AJAX - to me - is that you can respond to user interaction without reloading the document (and distracting the user while doing so).

Is that new?
NO.
Is it easier with AJAX than with POJAH?
YES.
How will it affect my server load?
DEPENDS.

No comments: