Question: What is AJAX? Explain its role in web application
1

Subject: Advanced Internet Technology

Topic: RIA and Mashup

Difficulty: Low

ait(26) • 1.4k views
ADD COMMENTlink
modified 16 months ago  • written 18 months ago by gravatar for yamini_patil_28 yamini_patil_28690
0

AJAX

  • Ajax is not a programming language or a tool, but a concept. Ajax is a client-side script that communicates to and from a server/database without the need for a postback or a complete page refresh.

  • Ajax is “the method of exchanging data with a server, and updating parts of a web page without reloading the entire page.”

  • Ajax itself is mostly a generic term for various JavaScript techniques used to connect to a web server dynamically without necessarily loading multiple pages. In a more narrowly-defined sense, it refers to the use of XmlHttpRequest objects to interact with a web server dynamically via JavaScript.

AJAX role in web application

  • They can use a standard web browser, such as Firefox, Internet Explorer or Safari, as their only user interface.

  • They don't force the user to wait for the web server every time the user clicks a button. This is what "asynchronous" means. For instance, gmail fetches new email messages in the background ("asynchronously") without forcing the user to wait. This makes an AJAX application respond much more like a "real" application on the user's computer.

  • 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 as asynchronously and independently of any interaction with the server.

  • They use standard JavaScript features to fetch data in the background and display different email messages or other data "on the fly" when the user clicks on appropriate parts of the interface.

  • Usually they manipulate data in XML format. This allows AJAX applications to interact easily with server-side code written in a variety of languages, such as PHP, Perl/CGI, Python and ASP.NET. Using XML isn't absolutely necessary, and in fact many "AJAX" applications don't they use the XMLHTTPRequest object to send and receive data "on the fly," but they don't actually bother packaging that data as XML.

  • 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.

ADD COMMENTlink
written 16 months ago by gravatar for yamini_patil_28 yamini_patil_28690
Please log in to add an answer.