AJAX - A Tool for the programming world.
Ajax is a technique for creating interactive web applications. Ajax makes it possible to create web pages which are responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user makes a change. This is meant to increase the web page's interactivity, speed, and usability.
How do AJAX applications work? How do you create an AJAX application? How do you convert Asp.Net applications in to AJAX enbaled applications? This book AJAX Programming
gives you all the steps of developing AJAX application.
Ajax uses a combination of:
- XHTML, CSS.
- The XMLHttpRequest object to exchange data asynchronously with the web server. In some Ajax frameworks and in certain situations, an IFrame object is used instead of the XMLHttpRequest object to exchange data with the web server.
- XML is sometimes used as the format for transferring data between the server and client, although any format will work, including preformatted HTML, plain text, JSON and even EBML.
Technologies that enable Ajax started with Microsoft's initiatives in developing Remote Scripting.
The Web development community, first collaborating via the microsoft.public.scripting.remote newsgroup and later through blog aggregation, subsequently developed a range of techniques for remote scripting in order to enable consistent results across different browsers. In 2002, a user-community modification to Microsoft Remote Scripting was made to replace the Java applet with XMLHttpRequest.
Microsoft Callbacks in ASP.NET are the recent improvisations.
Since XMLHttpRequest is now implemented across the majority of browsers in use, alternative techniques are used infrequently. However, they are still used where wide compatibility, small implementation, or cross-site access are required.
Let us see how Ajax Performs on Major Performance Criteria.
A major drawback of Ajax is the use of Back Button. Users expect that clicking the back button in web applications will move to their last page loaded, and in Ajax applications this is not the case. Developers have implemented various solutions to this problem, most of which revolve around creating or using invisible IFRAMEs to invoke changes that populate the history used by a browser's back button. Google Maps, overcomes this by performing searches in an invisible IFRAME and then pull results back into an element on the visible web page.
The interval between user request and server response, needs to be considered carefully during development using AJAX. Without clear feedback to the user, smart preloading of data and proper handling of the XMLHttpRequest object, users might experience delay in the interface of the web application. The use of visual feedback to alert the user of background activity and/or preloading of content and data are often suggested solutions to response time issues.
Using Ajax technologies in web applications requires strict adherence to WAI accessibility guidelines. Because of this, developers need to provide fallback options for users on other platforms or browsers, as most methods of Ajax implementation rely on features only present in desktop graphical browsers.
Web developers use Ajax in some instances to provide content only to specific portions of a web page, allowing data manipulation without incurring the cost of re-rendering the entire page in the web browser.
Ajax applications are mainly executed on the user's machine, by manipulating the current page within their browser using document object model methods. Ajax can be used for a multitude of tasks such as updating or deleting records, expanding web forms and returning simple search queries all without the requirement to fetch a full page of HTML each time a change is made. Generally only small requests are required to be sent to the server, and relatively short responses are sent back. This permits the development of more interactive applications featuring more responsive user interfaces due to the use of DHTML techniques.
While the Ajax platform is more restricted than the Java platform, current Ajax applications effectively fill part of the one-time niche of Java applets: extending the browser with lightweight mini-applications.
By Bharati Karedla