What is Ajax?

Ajax 

The term Ajax is used to describe a set of technologies that allow browsers to provide users with a more natural browsing experience. Before Ajax, Web sites forced their users into the submit/wait/reload paradigm, where the users’ actions were always synchronized with the server’s “think time. “Ajax provides the ability to communicate with the server asynchronously, thereby freeing the user experience from the request/response cycle. With Ajax, when a user clicks a button, you can use JavaScript and DHTML to immediately update the UI, and spawn an asynchronous request to the server to perform an update or query a database. When the request returns, you can then use JavaScript and CSS to update your UI accordingly without refreshing the entire page. Most importantly, users don’t even know your code is communicating with the server: the Web site feels like it’s instantly responding.

AJAX is not a new technology. It is a set of various existing technologies. Ajax key constituents:

  1. Standards-based presentation using XHTML and CSS
  2. Dynamic display and interaction using the Document Object Model
  3. Asynchronous server communication using XMLHttpRequest
  4. JavaScript binding everything together

 

Some uses for AJAX interactions are the following:

Real time formdata validation: Formdata such as user IDs, serial numbers, postal codes, or even special coupon codes that require server-side validation can be validated in a form before the user submits a form. See Real-time Form Validationfor details.

Auto completion: A specific portion of form data such as an email address, name, or city name may be autocompleted as the user types.

Load on demand: Based on a client event, an HTML page can fetch more data in the background, allowing the browser to load pages more quickly.

Sophisticated user interface controls and effects: Controls such as trees, menus, data tables, rich text editors, calendars, and progress bars allow for better user interaction and interaction with HTML pages, generally without requiring the user to reload the page.

Refreshing data and server push: HTML pages may poll data from a server for up-to-date data such as scores, stock quotes, weather, or application-specific data. A client may use AJAX techniques to get a set of current data without reloading a full page. Polling is not the most efficient means of ensuring that data on a page is the most current.

Partial submit: An HTML page can submit form data as needed without requiring a full page refresh. Mashups: An HTML page can obtain data using a server-side proxy or by including an external script to mix external data with your application’s or your service’s data. For example, you can mix content or data from a third-party application such as Google Maps with your own application. Page as an application: AJAX techniques can be made to create single-page applications that look and feel much like a desktop application. See the article on the use of AJAX and portlets for more on how you can use portlet applications today. Though not all-inclusive, this list shows that AJAX interactions allow web applications to do much more than they have done in the past.

One thought on “What is Ajax?

  1. furtdso linopv says:

    Good day! This is my first comment here so I just wanted to give a quick shout out and say I truly enjoy reading your articles. Can you recommend any other blogs/websites/forums that cover the same topics? Many thanks!

Leave a Reply

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