» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with scripts, + wiki,

Ajax

Ajax or Asynchronous Javascript and XML as it was first termed, is shorthand for Javascript UI development, particularly Javascript development that uses the XMLHttpRequest object. XMLHttpRequest and other techniques used to communicate to the server from Javascript prompted the invention of the word, using these techniques Web UIs driven by Javascript may be made more interactive with server data and more responsive, as small fragments of data may be exchanged efficiently between server and client.

Ajax driven applications differ from other rich UI technology driven applications such as Flash or Java by utilizing the other components of Web application development, namely HTML for document delivery and CSS for document styling, as well as sometimes even embedding other components such as Flash widgets.

A simple Ajax library that just implements a cross platform abstraction of XMLHttpRequest is the open source XHConn.

History of Ajax

Ajax, in the sense of communication with the server without a complete reload of the page, dates back to 1996/7, with the inclusion of the IFrame feature in Netscape and IE3. Other early techniques include using image loading to communicate with the server from Javascript.

These early attempts eventually evolved into a formal IE4 feature created by Microsoft to be used in their Outlook Web Access project, which developed a rich UI that was similar to using the native Outlook by communicating with the server directly from Javascript and using other Javascript functionality extensively.

Years later, Google’s web mail project GMail used Ajax techniques to provide a similarly rich experience for email through a web browser. The public, free and cross browser application attracted the attention of web developers by highlighting what could be done with Javascript and Ajax techniques to provide an interactive application over the web.

In the glow of this renewed attention to Javascript and Ajax techniques, the Adaptive Path web consultant Jesse James Garrett coined the term “Ajax” to describe A New Approach to Web Applications

The article and the term caught on, becoming a catchword for rich Javascript driven web UI.

Ajax server communication

Ajax may have been initially defined as Asynchronous Javascript and XML, however Ajax techniques are commonly not XML, and sometimes not Asynchronous.

The formats used most frequently in Ajax applications for exchanging data between the client and the server are plain text, HTML, and JSON/Javascript variables. Plain text and HTML are quite commonly used as they are simple and small, and can be directly injected into the document quickly. JSON/Javascript variables are common for more in depth data manipulation by the client script, and are simple to parse, requiring only an eval evocation.

XML use is directly supported in the XMLHttpRequest object (as implied by the name), however due to the parsing costs, both in development time and client CPU time, it is rarely used.

Problems with Ajax

While Ajax has enjoyed extreme popularity as a buzzword and catchphrase, and has been implemented to great effect in impressive applications beyond GMail, it has also attracted criticism, and applications using Ajax techniques have attracted criticism as well.

Ajax suffers from common complaints directed at Javascript driven applications. Some of these include problems with expected user behavior of the browser’s ‘back button’, accessibility problems from the perspective of users and search bots, and various cues generated by the browser such as the loading throbber that must be emulated directly by Ajax developers.

More on this topic can be found in the Ajax Mistakes article.

Another issue is cross browser coding, although Ajax techniques are available for virtually every web browser, support for various methods are almost never uniform, especially in the case of XMLHttpRequest, which has a few different implementations that must be coded for.

IE6 requires ActiveX be enabled for XMLHttpRequest to function, although IE7 will include it as a native object.

More on Ajax development issues can be found in Ajax-Development-Gotchas.

if any one can serve this with prototype and history keeper please help on that