Hello,
We were getting a number of querries from our clients and friends, asking about what AJAX is? With the development of Microsoft’s Live, everyone is going crazy about AJAX. So, we at Xaprio Solutions thaught of publishing this small article about AJAX, which will help you guys understand it better.
Like DHTML, LAMP, or SPA, Ajax is not a technology in itself, but a term that refers to the use of a group of technologies together. In fact, derivative/composite technologies based substantially upon Ajax, such as AFLAX, are already appearing.
The Term AJAX refers to, Asynchronous JavaScript and XML.
For a number of tasks, only small amounts of data need to be transferred between the client and the server, allowing a number of Ajax applications to perform almost as well as applications executed natively on the user’s machine. This has the effect that pages need only be incrementally updated in the user’s browser, rather than having to be entirely refreshed. “Every user’s action that normally would generate an HTTP request takes the form of a JavaScript call to the Ajax engine insteadâ€?, wrote Jesse James Garrett, in the essay that first defined the term. “Any response to a user action that doesn’t require a trip back to the server — such as simple data validation, editing data in memory, and even some navigation — the engine handles on its own. If the engine needs something from the server in order to respond — if it’s submitting data for processing, loading additional interface code, or retrieving new data — the engine makes those requests asynchronously, usually using XML, without stalling a user’s interaction with the application.â€?
Traditional web applications essentially submit forms, completed by a user, to a web server. The web server does some processing, and responds by sending a new web page back. Because the server must send a whole new page each time, applications run more slowly and awkwardly than their native counterparts.
Ajax applications, on the other hand, can send requests to the web server to retrieve only the data that is needed, and may use SOAP or some other XML-based web services dialect. On the client, JavaScript processes the web server’s response, and may then modify the document’s content through the DOM to show the user that an action has been completed. The result is a more responsive application, since the amount of data interchanged between the web browser and web server is vastly reduced. Web server processing time is also saved, since much of it is done on the client.
The earliest form of asynchronous remote scripting, Microsoft’s Remote Scripting, was developed before XMLHttpRequest existed, and made use of a dedicated Java applet. Thereafter, remote scripting was extended by Netscape DevEdge at around 2001/2002 by use of an IFRAME instead of a Java applet.
Pros
Interactivity
Ajax applications are mostly executed on the user’s computer; they can perform a number of tasks without their performance being limited by the network. This permits the development of interactive applications, in particular reactive and rich graphic user interfaces.
Portability sample
Ajax applications target a well-documented platform, implemented by all major browsers on most existing platforms. While it is uncertain that this compatibility will resist the advent of the next generations of browsers (in particular, Firefox 2 and Internet Explorer 7), at the moment, Ajax applications are effectively cross-platform.
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 portable, lightweight mini-applications
Cons
Usability Criticisms
One major complaint voiced against the use of Ajax in web applications is that it might easily break the expected behavior of the browser’s back button (see Jakob Nielsen’s 1999 Top-10 New Mistakes of Web Design). The different expectations between returning to a page which has been modified dynamically versus the return to a previous static page might be a subtle one. Users generally expect that clicking the back button in web applications will undo their last state change and in Ajax applications this might not be 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, for example, performs searches in an invisible IFRAME and then pulls results back into an element on the visible web page; it is possible to track user behaviour via callbacks which are called whenever the back button is pressed, restoring the application state that existed at the time.
A related issue is that the use of dynamic web page updates makes it difficult for a user to bookmark a particular state of the application. Solutions to this problem have likewise begun to appear, many of which use the URL fragment identifier (commonly known as the anchor, or the portion of the URL after the ‘#’) to keep track of, and allow users to return to, the application in a given state. (Many browsers allow JavaScript scripts to update the anchor dynamically, which allows the Ajax application to update it in parallel with the contents of the display.) These solutions also address many of the issues related to lack of back button support.
Response-time concerns
Network latency — or the interval between user request and server response — needs to be considered carefully during Ajax development. Without clear feedback to the user
[1], smart preloading of data
[2], and proper handling of the XMLHttpRequest object
[3] users might experience delay in the interface of the web application, something which users might not expect or understand.
[4] The use of visual feedback to alert the user of background activity and/or preloading of content and data are often suggested solutions to these latency issues.
JavaScript must not be disabled
While no browser plug-in is required for Ajax, it requires users to have JavaScript enabled in their browsers.
Some browsers do not support JavaScript or ActiveX. Security settings might cause Internet Explorer to not support Ajax (e.g.: JavaScript or ActiveX might be disabled).
As with DHTML applications, Ajax applications must be tested rigorously to deal with the quirks of different browsers and platforms. A number of programming libraries have become available as Ajax has matured that can help ease this task. Likewise, techniques have been developed to assist in designing applications which degrade gracefully and offer alternative functionality for users without JavaScript enabled.
Search Engine Optimization
Another CON of AJAX is its incompatiblity with Search Engine Optimization (SEO). With the growth of Internet, the competition of webmasters, to show there site up in search engines then others is growing at a fast pace, for which SEO is a must. But AJAX creates a problem here, since all the work including form submissions, links and all are on same page and displayed on a single page. All of the code of the page is in JavaScript, which is striped by search engine bots, so effectively your webpage don’t have any effective content hence u goes down with the search engines.
Hope the above will help you know what AJAX is.
Recent Comments