Ajax Technology: Prashant Baid 1214109135
Ajax Technology: Prashant Baid 1214109135
By
OVERVIEW
Introduction Existing AJAX applications Classic Vs AJAX AJAX interaction steps XmlHttpRequest and its properties Applications of AJAX Examples of AJAX
INTRODUCTION
AJAX is not a programming language, but simply a new technique for creating better, faster and more interactive web applications. AJAX(Asynchronous JavaScript and XML) is a technique for submitting server requests "in the background" and returning the information from the server to the user without the necessity of waiting for a page reload.
Contd
With the AJAX model the execution of the web page is processed in three different phases:
2) fully AJAXed - here AJAX is necessary for functionalities as well as for user-interface. e.g. Meebo, Google Maps, Windows Live
Contd
5. The ValidateServlet returns an XML document containing the results.
6. The XMLHttpRequest object calls the callback () function and processes the result.
XMLHTTP REQUEST
A JavaScript Class that lets you make asynchronous HTTP requests from JavaScript Make an HTTP request from a JavaScript event A call back JavaScript function is invoked at each state of the HTTP request and response
Contd
responseXML - DOM xml object from the request
status - HTTP status code of the response statusText - HTTP status text
APPLICTIONS IN AJAX
3-tier client/server apps Browser App Server Data Source Event driven User clicks, user drags, user changes data Graphics Intensive Visual Effects, Rich Visual Controls
Contd
Are Data Oriented Users are manipulating and entering data Are Complex Pages hold many more controls and data than page-oriented Applications Multiple Master-Detail Relationships in one page
Examples in AJAX
G-Mail www.gmail.com Google Maps www.maps.google.com Flickr www.flicker.com Facebook www.facebook.com
ADVANTAGES
Google helped popularize, and legitimize it in G-Mail Increase Usability of Web Applications Rich Internet Applications without Flash Save Bandwidth Download only data you need
LIMITATIONS
Breaks back button support URL's don't change as state changes Cross Browser Issues can be a pain JavaScript may tax older machines CPU Can't access domains other than the calling domain Debugging is difficult
Conclusion
Its about the users and how they interact with the product. Without the users, the projects we build would have no purpose. With that principle in mind, we can assess what technologies to use and when to use them in order to create an application that's beneficial to all who use it.