Tuesday, February 2, 2010

What is AJAX and what problem does it solve?

Answer
Ajax is a set of client side technologies that allows asynchronous communication between client and web server. In synchronous communication, complete round trip happens with each request/response action event when small data of the page to be refreshed. Ajax has solved this problem of posting entire information every time through asynchronous communication.
XmlHttpRequest is the basic fundamental behind Ajax. This allows browser to communicate with server without making post backs.

What are the benefits of AJAX over Java applet?  

The following are the benefits of AJAX over Java applet:
  • AJAX applications are loaded in seconds, where as Applets takes longer time. The reason is, Applet applications are tend to load large libraries.
  • AJAX provides standard look and feel for web applications, where as Applets provides GUI based look and feel.
  • AJAX features can increase from a conventional web application, where as Applets uses complete programming process right from the scratch.
  • Java version changes enable incompatibilities between Applet and java environments used by the browser, where as in AJAX incompatibilities are not the constraints.

What is the disadvantage of AJAX?  

The disadvantages of AJAX are:
  • Search engines would not be able to index an AJAX application.
  • The server information can not be accessed within AJAX.
  • AJAX is not well integrated with any browser.
  • ActiveX requests are enabled only in IE 5 and IE6
  • Data of all requests is URL-encoded, which increases the size of the request.

How is encoding handled in AJAX?  

AJAX encoding can be done in two ways:
encodeActionURL() method is used for full page refresh
encodeResourceURL() method is used for partial page refresh.

0 Comments: