Difference between Ajax and REST

Key difference: AJAX stands for Asynchronous JavaScript and XML. It is a group of web development programs used to design websites. The programs create interactive web applications using a combination of XHTML for basic programming, CSS for styling, DOM for interaction, data exchange using XML and XSLT, XMLHttpRequest and JavaScript. REST stands for Representational State Transfer. It is a type of software architecture for distributed systems. The most commonly example of this would be the World Wide Web. Currently, REST is considered to be one of the most predominant web API design model.

AJAX stands for Asynchronous JavaScript and XML. It is a group of web development programs used to design websites. The programs create interactive web applications using a combination of XHTML for basic programming, CSS for styling, DOM for interaction, data exchange using XML and XSLT, XMLHttpRequest and JavaScript. AJAX enables web pages to send data to and receive data from a server without changing or hindering the web page itself. AJAX eliminates the need for the customers to wait, making interaction between the customer and the server asynchronous.

Google is the biggest known supporter of AJAX and has invested millions of dollars to advance it. Major Google products, such as Orkut, Gmail, Google Suggest, and Google Maps are AJAX applications. Amazon has also launched it’s own search engine, A9, on AJAX.

Ajax is not a single technology. It is a group of technologies. Jesse James Garrett, the one who coined the term, AJAX, lists the various technologies incorporated in AJAX:

 
  • HTML (or XHTML) and CSS for presentation
  • The Document Object Model (DOM) for dynamic display of and interaction with data
  • XML for the interchange of data, and XSLT for its manipulation
  • The XMLHttpRequest object for asynchronous communication
  • JavaScript to bring these technologies together

REST stands for Representational State Transfer. It is a type of software architecture for distributed systems. The most commonly example of this would be the World Wide Web. The World Wide Web is the largest implementation of a system conforming to the REST architectural style. Currently, REST is considered to be one of the most predominant web API design model.

The REST architectural style was developed by W3C Technical Architecture Group (TAG) in parallel with HTTP/1.1. It was based on the HTTP/1.0.  REST-style architectures consist of clients and servers. The way a REST-style architecture works is that a client initiates a request to a server. The server then processes the request and returns the appropriate response. The requests and responses are built around the transfer of representations of resources.

Wikipedia lists the key goals of REST as:

  • Scalability of component interactions
  • Generality of interfaces
  • Independent deployment of components
  • Intermediary components to reduce latency, enforce security and encapsulate legacy systems

REST has also been applied to describe the desired web architecture, to help identify existing problems, to compare alternative solutions, and to ensure that protocol extensions would not violate the core constraints that make the Web successful.

The main difference between AJAX and REST is that, Ajax is a set of technologies.

It is a method to dynamically update parts of the UI without having to reload the page. REST, on the other hand, is a type of software architecture. It is a method for users to request information from servers. 

Image Courtesy: esublimeinfosystems.com, freshsqueezedmarketing.com

Most Searched in Society and Culture Most Searched in Electronics
Most Searched in Environment Most Searched in Arts and Humanities
Fear vs Phobia
Gorilla Glass 1 vs 2 vs 3
Tequila Gold vs Silver
Samsung Galaxy S4 Active vs HTC One

Add new comment

Plain text

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.