Difference between Ajax and JSON

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. JSON is short for JavaScript Object Notation. It is a text-based open standard designed for human-readable data interchange. Basically, it is a way to store information in an organized, easy-to-access manner, which is easily readable by humans.  It is also easy for machines to parse and generate.

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

JSON is short for JavaScript Object Notation. It is a text-based open standard designed for human-readable data interchange. Basically, it is a way to store information in an organized, easy-to-access manner, which is easily readable by humans.  It is also easy for machines to parse and generate.

JSON is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. However, as compared to JavaScript, it is language-independent, with parsers available for many languages. It was originally specified by Douglas Crockford. The JSON filename extension is .json.

Json.org defines JSON as being built on two structures:

  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

The JSON format is quite similar to XML and works as an alternative for the latter. It is primarily used to transmit data between a server and web application. It is also often used for serializing and transmitting structured data over a network connection.

The main difference between AJAX and JSON is that AJAX is a set of various technologies, which are used to launch asynchronous HTTP requests to a server using various data formats, such as JavaScript, XML, HTML, plain text or even JSON. JSON is a format which can be used by AJAX for data exchange. It is a way of encoding that can be efficiently parsed by almost all programming languages. In AJAX, JSON can be used to pass raw data to or from a server-side component.

ncG1vJloZrCvp2OxqrLFnqmeppOar6bA1p6cp2aZo7Owe8OinZ%2Bdopq7pLGMm5ytr5Wau26tyZqvZpmemXqrv86n