How AJAX (Asynchronous JavaScript + XML) Works

Capture

AJAX Breakdown

AJAX uses the following technologies:

  • XML or JSON: the text-only format used to transfer data from server to browser script. Developers are increasingly using JSON over XML because of its native JavaScript compatibility.
  • CSS: the language used to style how the data will look onscreen
  • JavaScript: displays the data in the browser and processes user requests/interactions like clicks
  • XMLHttpRequest objects: the keystone of AJAX, they actually retrieve the data with the server behind the scenes. All modern browsers support XMLHttpRequests.

Callbacks vs. Postbacks.

Pre-AJAX, the rules for client calls to the server—basically, anything the browser requests from a database to make a site responsive—were “postbacks,” plus server-side processing. Post-AJAX, the browser can “callback,” requesting small amounts of data directly from the server—all without needing to wait for a postback.

What Advances have Been Made to Ajax?


JavaScript is the client-side programming language and XML is a markup language to define data. JSON is another markup language to define data. JSON (JavaScript Object Notation) is much easier to use with JavaScript than XML. When it comes to Ajax and JavaScript, JSON Web Services are replacing XML Web Services.

Another major advance to JavaScript and Ajax is the JavaScript object library called jQuery. This free, open-source software is a wrapper around JavaScript. jQuery is used to easily write client-side JavaScript to navigate and manipulate a page and make asynchronous Ajax callbacks.

By using jQuery and JSON Web Services, Ajax callbacks have become standard programming practices for designing and developing web applications.

The Ajax Control Toolkit is a suite of controls created by Microsoft that is integrated into Visual Studio and can be dragged and dropped onto web forms just like html and server controls. These controls are intended to be used for Ajax callbacks. However, they can also be used as normal client and or server controls. For example, Asp.Net does not come with the Tabs controls. However, the Ajax Control Toolkit does. The Tab control can postback to the server just like server controls.

AJAX_logo_by_gengns.svg_

Leave a Reply

Your email address will not be published. Required fields are marked *