AJAx and JSON

18/09/2010 19:07


Ajax:

It  is a set of client side technologies  ,it facilitate asynchronous communication between the user interface and web server..

Pros:

·        Minimal  data transfer

·        No maximum load to overloaded server

Fundamental idea behind the AJAX:

ü “XmlHttpRequest “ ia an object and it is the fundamental idea behind the AJAX.

ü It allows web browser to communicate with the back end server asynchronously without any post backs

 

JSON

v It is very lightweight data format .

v It is based on java script syntax like that of array and object literals.

v It provides communication to server in standard format..

Use

§  It is used as a communication notation instead of XML

e.g creation of a bike object with two properties color and speed  

var obike=

{

“Speed”  :200;

“color”  :”green”;

};

alerts(obike.Speed);//outputs 200

alerts(obike.color);//outputs green