Monday, January 24, 2011

AJAX


AJAX, shorthand for Asynchronous JavaScript and XML, is a web development technique for creating interactive web applications.

AJAX meant to increase the web page’s interactivity, speed, and usability.

If you know JavaScript, HTML, CSS and XML then you need to spend just one hour to start with AJAX.

Ajax Acts as an Intermediary

The Ajax engine works within the Web browser (through JavaScript and the DOM) to render the Web application and handle any requests that the customer might have of the Web server. The beauty of it is that because the Ajax engine is handling the requests, it can hold most information in the engine itself, while allowing the interaction with the application and the customer to happen asynchronously and independently of any interaction with the server.

Asynchronous

This is the key. In standard Web applications, the interaction between the customer and the server is synchronous. This means that one has to happen after the other. If a customer clicks a link, the request is sent to the server, which then sends the results back.
With Ajax, the JavaScript that is loaded when the page loads handles most of the basic tasks such as data validation and manipulation, as well as display rendering the Ajax engine handles without a trip to the server. At the same time that it is making display changes for the customer, it is sending data back and forth to the server. But the data transfer is not dependent upon actions of the customer.

Ajax is Not New Technology

Ajax is instead a new way of looking at technology that is already mature and stable. If you’re designing Web applications right now, why aren’t you using Ajax? Your customers will thank you, and frankly, it’s just fun! 

What is AJAX ?
  1. AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS and Java Script.
  2. Ajax uses XHTML for content and CSS for presentation, as well as the Document Object Model and JavaScript for dynamic content display.
  3. Conventional web application trasmit information to and from the sever using synchronous requests. This means you fill out a form, hit submit, and get directed to a new page with new information from the server.
  4. With AJAX when submit is pressed, JavaScript will make a request to the server, interpret the results and update the current screen. In the purest sense, the user would never know that anything was even transmitted to the server.
  5. XML is commonly used as the format for receiving server data, although any format, including plain text, can be used.
  6. AJAX is a web browser technology independent of web server software.
  7. A user can continue to use the application while the client program requests information from the server in the background
  8. Intuitive and natural user interaction. No clicking required only Mouse movement is a sufficient event trigger.
  9. Data-driven as opposed to page-driven
Rich Internet Application (RIA) Technology
AJAX is most viable RIA technology so far. Its getting tremendous industry momentum and several toolkit and framworks areemerging. But same time JAX has browser incompatibility and it is supported by Java Script which is hard to maintain nand debug.

AJAX Is Based On Open Standards
AJAX is based on the following open standards:
  • Browser-based presentation using HTML and Cascading Style Sheets (CSS)
  • Data stored in XML format and fetched from the server
  • Behind-the-scenes data fetches using XMLHttpRequest objects in the browser
  • JavaScript to make everything happen
Technologies Used in AJAX
JavaScript
  • Loosely typed scripting language
  • JavaScript function is called when an event in a page occurs
  • Glue for the whole AJAX operation
API for accessing and manipulating structured documents
  • Represents the structure of XML and HTML documents
CSS
  • Allows for a clear separation of the presentation style from the content and may be changed programmatically by JavaScript
XMLHttpRequest
  • JavaScript object that performs asynchrous interaction with the server
Current Issues with AJAX
AJAX is growing very fast and that is the reason that it contains many issues with it. We hope with the passes of time they will be resolved ab AJAX will be ideal for web applications. We are listing down few issues which AJAX has as a challenge.
Complexity is increased
  • Server side developers will need to understand that presentation logic will be required in the HTML client pages as well as in the server-side logic
  • Page developers must have JavaScript technology skills
AJAX-based applications can be difficult to debug, test, and maintain
  • JavaScript is hard to test – automatic testing is hard
  • Weak modularity in JavaScript
  • Lack of design patterns or best practice guidelines yet
Toolkits/Frameworks are not mature yet
  • Most of them are in beta phase
No standardization of the XMLHttpRequest yet
  • Future version of IE will address this
No support of XMLHttpRequest in old browsers
  • Iframe will help
JavaScript technology dependency & incompatibility
  • Must be enabled for applications to function
  • Still some browser incompatibilities
JavaScript code is visible to a hacker
  • Poorly designed JavaScript code can invite security problem

No comments:

Post a Comment