AJAX in a nutshell
One of the drawbacks of the web is the push and pull of the client-server relationship. The client requests something, and then you wait while the server responds. Your page reloads, and the process continues. For most mundane situations this is just fine. If you are reading a text article like this, the response from the server is generally almost instant (unless the site is extremely ad-heavy).
The problem begins to rear its ugly head when you want to begin building richer sites and applications. When you want the user to start interacting with the interface – like a map for example! Then you begin to see the inherent problem in the client-server request/response cycle. I want to move the map over one mile because what I want to see is just out of my view. I click an arrow or some widget, and the client calls the server, gets the direction and whatever else it needs from the request to figure out what John Doe wants to see, and then pushes back the next version of the map. But oops! I went the wrong way – I wanted to go East, not West! Oh boy, now you have to click twice, and wait twice as long.
Apply this concept to any rich application where you’d want more than a casual interaction with your users. Even adding items to a shopping cart and updating that card can be a tedious process. Then think about more customized and “cooler” interfaces you might want to do – such as changing page layouts on the fly, color schemes or even data sets. Again, the typical client-server cycle – a synchronous cycle.
AJAX however, is asynchronous. In other words, it does not wait for the client-server cycle – it happens independently instead. So when you request to move the map – the action begins happening immediately. There is no waiting for the server to respond because there is already an AJAX engine loaded up (when you first arrives) that facilitates the data transfer. If you have ever played around with a Google map (or any of the neat websites that are making use of them) you know exactly what we’re talking about.