Ajax (web technology): Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Dhawal Sehgal
mNo edit summary
imported>Dhawal Sehgal
(benefits of AJAX)
Line 22: Line 22:


An odd fact is that none of the technologies mentioned above are mandatory to create an AJAX page or at least an AJAX like functionality. For instance, one could use an inline frame that contains a document that uses META Refresh to poll and update content on a portion of the inline frame's parent element.  XML is just one of the formats the response can be sent and in many cases [[JSON JSON(JavaScript Object Notation]] is often an easier and better choice and raw HTML or plain text can be sent as well.  Despite its name, AJAX does not have to be asynchronous, and sometimes it is erroneously applied to be a simple function in a JavaScript library.
An odd fact is that none of the technologies mentioned above are mandatory to create an AJAX page or at least an AJAX like functionality. For instance, one could use an inline frame that contains a document that uses META Refresh to poll and update content on a portion of the inline frame's parent element.  XML is just one of the formats the response can be sent and in many cases [[JSON JSON(JavaScript Object Notation]] is often an easier and better choice and raw HTML or plain text can be sent as well.  Despite its name, AJAX does not have to be asynchronous, and sometimes it is erroneously applied to be a simple function in a JavaScript library.
== Benefits of AJAX ==
• AJAX helps in improving user interactivity with the application interface.<br>
• AJAX can buffer data before the user actually needs it. This helps in increasing the overall speed of the web application and reduces wait time for the user.<br>
• Helps in reducing bandwidth requirements for an application as only the data that is needed is requested and transferred – refreshing the entire page is not necessary.<br>
• AJAX helps in executing queries that take a long time to run. Instead of waiting for the results after clicking the submit button, AJAX can make the data request in the background, while the user can still continually interact with the page.<br>
• Dynamic data filtering works well with AJAX. An example of the same is the Cascading dropdown control of the ASP.NET AJAX control toolkit.<br>
• AJAX is really good for form submissions. Feedback can be given to a user as the form is filled. There is no need to wait for the form to be submitted. For example, Hints can be given to a user while he is filling a form.


== Examples of AJAX Frameworks ==
== Examples of AJAX Frameworks ==

Revision as of 00:11, 3 August 2008

Nuvola apps kbounce green.png
Nuvola apps kbounce green.png
This article is currently being developed as part of an Eduzendium student project. One of the goals of the course is to provide students with insider experience in collaborative educational projects, and so you are warmly invited to join in here, or to leave comments on the discussion page. However, please refrain from removing this notice.
Besides, many other Eduzendium articles welcome your collaboration!



Introduction

AJAX - an acronym for Asynchronous JavaScript And XML - is an emerging web technology that enhances the end users' web browsing experience by streamlining background web content request, as opposed to generating and serving up new pages for every change or update to the web page.

Ajax is essentially more than a single technology. It is a combination of various existing technologies which combine together in new, more powerful ways.
It has the aspects of: -
• XHTML, CSS for standards-based presentation.
• XML and XSLT for data interchange and manipulation.
• XMLHttpRequest for asynchronous data retrieval.
• Document Object Model for dynamic display and interaction.
• JavaScript for binding everything together.

The premise of AJAX is to allow light weight calls to a web server and update the web page currently displayed without re-rendering the entire page, but only the affected portion(s). The calls are made by means of the XMLHTTPRequest object built into the newer versions of JavaScript. Older browsers may mimic AJAX's behavior with another technique using JavaScript and FRAMEs, known as Remote Scripting.
AJAX has become so popular that is has forced some browsers to implement it natively, without use of COMs such as ActiveX and creating a standard built in object.
AJAX is used to create better, faster, and more user-friendly web applications. Ajax is not exactly a new programming language, but a new way to implement existing standards.

Constituents

AJAX may include the use of a range of web technologies such as JavaScript, XML:XML(eXtensible Mark Language), DOM:DOM(Document Object Model) , CSS CSS(Cascading Style Sheets), but does not necessarily mean they are necessary.

An odd fact is that none of the technologies mentioned above are mandatory to create an AJAX page or at least an AJAX like functionality. For instance, one could use an inline frame that contains a document that uses META Refresh to poll and update content on a portion of the inline frame's parent element. XML is just one of the formats the response can be sent and in many cases JSON JSON(JavaScript Object Notation is often an easier and better choice and raw HTML or plain text can be sent as well. Despite its name, AJAX does not have to be asynchronous, and sometimes it is erroneously applied to be a simple function in a JavaScript library.

Benefits of AJAX

• AJAX helps in improving user interactivity with the application interface.
• AJAX can buffer data before the user actually needs it. This helps in increasing the overall speed of the web application and reduces wait time for the user.
• Helps in reducing bandwidth requirements for an application as only the data that is needed is requested and transferred – refreshing the entire page is not necessary.
• AJAX helps in executing queries that take a long time to run. Instead of waiting for the results after clicking the submit button, AJAX can make the data request in the background, while the user can still continually interact with the page.
• Dynamic data filtering works well with AJAX. An example of the same is the Cascading dropdown control of the ASP.NET AJAX control toolkit.
• AJAX is really good for form submissions. Feedback can be given to a user as the form is filled. There is no need to wait for the form to be submitted. For example, Hints can be given to a user while he is filling a form.

Examples of AJAX Frameworks

  • Microsoft .NET (Visual Studio)
  • Google Web Toolkit
  • Ruby on Rails (ROR)
  • Echo