what do you means by ajax?
AJAX stands for Asynchronous JavaScript and XML. It refers to a set of technologies that work together to create interactive web applications. These technologies include:
- JavaScript: A programming language for creating dynamic content.
- DOM (Document Object Model): A way to represent and interact with objects in HTML or XML documents.
- XML: A markup language used to store and transport data (though JSON is more common now).
- HTML/XHTML: The standard languages for creating web pages.
- CSS: A style sheet language used for describing the look and formatting of a document written in HTML or XML.
- XMLHttpRequest: An API used to send and receive data from a server asynchronously, without refreshing the page.
Where it is used?
There are too many web applications running on the web that are using ajax technology like gmail, facebook,twitter, google map, youtube etc.
Understanding Synchronous vs Asynchronous
Synchronous (Classic Web-Application Model)
A synchronous request makes the browser wait until the operation is finished, making the browser unresponsive during that time. This means you can’t do anything else on the web page while waiting for the response.
Let’s understand it another way.
Asynchronous (AJAX Web-Application Model)
An asynchronous request lets the browser stay responsive while waiting for a response. This means you can continue using the web page and do other things without interruption.
Let’s try to understand asynchronous communication by the image given below.
AJAX Technologies:
As mentioned earlier, AJAX is not a single technology but a group of related technologies working together. These include:
- HTML/XHTML and CSS
- DOM
- XML or JSON
- XMLHttpRequest
- JavaScript
HTML/XHTML and CSS:
These technologies are used to display content and style on web pages. They are mainly used to control how things look.
DOM:
It is used for dynamic display and interaction with data.
XML or JSON
For sending and receiving data from the server, JSON (JavaScript Object Notation) is often used. It’s similar to XML but shorter and faster.