History of AJAX Starts with web pages Static web pages Static html page is loaded No interaction with user Dynamic web pages html page is generated dynamically Interaction with user Becomes slower as functionality increases Speed becomes untolerable, so AJAX has been born
What is So Cool about AJAX? Connection between client side script and server side script. Better user experience. More flexibility. More options.
AJAX ExamplesGoogle MapsUser can drag the entire map by using the mouse instead of clicking on abutton or somethingGoogle SuggestGoogle will offer suggestions.GmailGmail is a new kind of webmail, built on the idea that email can be moreintuitive, efficient and usefulYahoo Maps (new)Now its even easier and more fun to get where youre going!
Why it is Popular? Google helped popularize, and legitimize it in Gmail. Increase Usability of Web Applications. Rich Internet applications without Flash. Save Bandwidth. Download only data you need. Faster interfaces.
Advantages of AJAX Better internet Application Requests only the content that needs to be updated Respond quickly to the input Page can be reloaded individually Reduces connections to the serverPrevents unnecessary reloading of a page
AJAX Browser SupportInternet Explorer OperaMozilla Firefox Flock Safari Netscape
Working cont…..XMLHTTPRequest ObjectHeart of the AJAX Engine and it is responsible to carry the HTTP requestto the server asynchronously.Talking with the ServerXMLHTTPRequest talks with the server with its appropriate methods andproperties asynchronously at the backside.Server ResponseAs per the Server script is concerned the request from the XMLHTTPRequest isjust another HTTP request.Dealing with the Server ResponseOnce after the AJAX Engine gets notified about the successful execution.It modifies the data according to the functionality and keeps in place.
AJAX ServerAJAX is about creating clever applications that can use the data.Requesting Text FilesMany AJAX applications requests pure text files to retrieve data forthe application.Requesting XML FilesA very common AJAX method is to request XML files to retrieveapplication data.
Requesting ASP or PHP FilesRequesting an ASP or PHP file is the most common way to accessdatabase information.Requesting HTML FilesRequesting HTML files is a common method for filling out differentinformation on a web page.Submitting FormsWith AJAX you can easily submit form data without having to reload thepage.