Ajax Explained

|

ajax.jpg
This article over at adaptive path does a beautiful job of explaining Ajax. Ajax is short hand for Asynchronous JavaScript + XML.

It's really just (to my knowledge) javaScript taking the place of requesting and receiving data as opposed to having to submit (thus waiting for the reload) the whole page.

I think I read that it's only doable in IE5+ and more recent versions of Mozilla, so keep that in mind when programming. My one bid complaint about using newer technologies not supported by all browsers is having to make the page backward compatible. It takes so much time to code for each and every browser and user setting.

Here is some psudocode to explain what I mean.




if (has javascript){
if (is Microsoft) {
if (can handle ActiveXObject("Microsoft.XMLHTTP")) {
...Show cool Ajax stuff...
}
else {
...Show less interesting interface that may include JS, but not "Microsoft.XMLHTTP"...
}
}
elsif (is Mozilla or is Safari) {
if (can handle XMLHttpRequest()){
...Show cool Ajax stuff...
}
else {
...Show less interesting interface that may include JS, but not XMLHttpRequest()...
}
}
elsif (is a number of different browsers){
...Browser is JS enabled, but not most popular...
}
}
else {
...time to whip out <noscript>...
}

What's sad is that I'm probably missing a step or two in the code.

All in all, I like it, and I guess I'm left wondering if this is the same as doing SOAP requests in JavaScript. At any rate I like it and what it can do and how well people have been using it (amazon.com, suggest.google.com, maps.google.com, gmail.com, etc)

About this Entry

This page contains a single entry by Will published on May 25, 2005 8:07 AM.

Greasemonkey was the previous entry in this blog.

Get5Friends.com is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01
Support this site by opening up a hosting account with site5.com
Powered By Site5.com