AJAX: Just Like Fast Food

There are some fast food outlets that start cookingand send you back a result (an example is attempting
food only after you walk up to the counter andto fetch images from certain online photo sharing
order it. Make no mistake, these are the inefficientsites).But suppose your desktop had a program in it
outlets. You end up waiting half an hour for yourwhich anticipated what your next request could be,
meal to appear and vow never to go the restaurantgot that information ahead of time from the server,
again because of the time it made you waste.Switchand kept it ready for your browser. When you did
to a well-organized fast-food outlet. Popular menumake the request, the information you wanted would
items are already waiting for you in the brightly litbe readily available in your desktop. You would not
'keep warm' showcase. You walk up to the counter,have to wait for it to be fetched from the server;
order a burger with fries, the salesperson goes tothe program gives it to your browser and it is
the showcase, takes out a warm, packaged burger,displayed immediately.Now think of the 'keep warm'
takes out fries and gives them all to you in ashowcase strategy in the fast food restaurant. You
jiffy.AJAX is a strategy for giving you web pages insee the similarity in concepts?So here's the thing: the
a jiffy. I can't but help thinking that Jesse Jamesprogram in your desktop that anticipates your next
Garrett, credited with being the brain behind AJAX,move and 'pre-fetches' data from the server is called
spent a lot of time at the best fast food outlets.an 'AJAX Engine'. It is written in the JavaScript
Why? Because the AJAX strategy is uncannily similarprogramming language.When it pre-fetches data from
to that used in a quality fast food establishment.Let'sthe server, it uses a programming language called
think for a moment about how your browserXML.The pre-fetching does not occur as a result of
(Internet Explorer, Firefox, whatever) fetches a webyour request for a page. It happens at other times,
page for you. You type the URL for the page intoperhaps while you are sitting back and viewing the
your browser. Your browser sends a request to alast page that was sent. The pre-fetching is thus not
computer on the internet (the 'server' at that URL)synchronized with your requests for pages. This is
to send that page back. The server pulls the pageknown technically as asynchronous pre-fetching.Hence
out from its store of pages and sends it to yourthe name Asynchronous JavaScript And XML, AJAX
browser, which displays the page on yourfor short. And guess what, Google Groups, Google
screen.Usually you do not have to wait more than 15Suggest, and Google Maps are all implemented with
seconds for the page to reach your browser and beAJAX.It is likely that AJAX is going to show up more
displayed on your screen.But sometimes it can take afrequently in the design of interactive websites in the
whole half minute (which is the same as 'forever' incoming years. Now you do not have to wonder what
Internet terms) to see your page. Usually this occursit is!Lucky Balaraman is a graduate engineer and one
in a situation where you have entered some data in aof the founders of The Magnum Group, a leading
web page, sent it down the Internet to a server,web design and CAD service provider based at
and are expecting the server to process your dataChennai, India.