What is AJAX?

A couple of minutes ago I was talking to a friend of mine and I realised that what AJAX stands for, what it means, it represents is not clear for some people.

AJAX =  Asynchronous JavaScript and XML

AJAX is a group of interrelated technologies to create asynchronous web experience on the client side.

With the AJAX methodology you can send and receive data from a server asynchronously without interfering with the current web page, without affecting display and behavior of it. (without postback)

Ajax is a GROUP of technologies:

Javascript: Provide a method for exchanging data asynchronously between browser and server to avoid full page reloads + access, manipulate, update DOM(Document Object Model) + Allow user interaction

CSS, HTML: Provide markup and styling.

JSON: Serialization method. Serialize the data generated on the server side before sending it to the client.

Web Services: Generate the data on the server side in response to some client-side trigger (event).

Workflow:

Below is the way AJAX works.

Browser

  • Event is triggered on the client side.
  • An XMLHttpRequest object is created.
  • HttpRequest is sent.

Server

  • Server code executed & HttpRequest is processed.
  • Response is generated and sent back to browser.

Browser

  • Returned data is processed using javascript.
  • Page content updated using javascript.

This is the graphical representation of the above workflow:


Hope this helps someone.

Good luck,
Serdar

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