What is AJAX?
AJAX (Asynchronous Javascript and XML) is a collection of old technologies with slight deviations to each of these technologies. These groups of technologies comprise of the following aspects, namely:
- HTML and CSS
- Javascript
- XML and XSLT
- XMLHttpRequest
Ajax allows displaying web pages with interactive, efficient and quick interfaces, the benefits behind ajax have pushed several web developers to program websites by implementing ajax, web giants like Google, effectively utilize ajax in their web applications like Gmail and Google Maps.
While on first impressions using the collection of the above 4 technologies to develop a website may appear to be baffling, digging in further you will find it no different to a writing a script using syntax similar to ordinary web development technologies like Ajax. Let's look at the above aspects in a little more detail:
- HTML and CSS
Short for Hyper Text Markup Language and Cascading Style Sheet, this is used for presenting the data on your web page including text and images; it basically comprises of the interface and is not part of the processing in most cases.
- Javascript
This is the base language that Ajax works with, it is used to associate and process with the information within the website, i.e. the data provided in the HTML and CSS mentioned above. Javascript is also used to gain access to the DOM model which enables the developer to gain access to the various objects used in the web page and interact with it.
- XMLHttpRequest, XML and XSLT
XML and XSLT is used to interchange the data presented in the web page and XMLHttpRequest is the main aspect behind Ajax that distinguishes its functionality from other web development techniques, it allows processing data using the web server asynchronously.
As aforementioned, these technologies have existed for quite some time however the slight differences in the way the functions plus the combination of the above technologies is how Ajax works. Basically the XML, XSLT and XMLHttpRequest work in a system where javascript requests can be sent to the server and results of the processing can be retrieved without reloading the web page. A nice example of a full site using AJAX without a single page refresh, check bert.ws!
Ajax can work with almost all mainstream programming languages like HTML, asp.net, perl, etc. The rapid shift with webmasters using ajax for their website interface is quickly making ajax a vital requirement for web developers to be familiar with.