Wednesday 26 November 2014

AJAX Interview Question

What is AJAX ?
AJAX stands for Asynchronous Javascript and XML. It is a technique for creating better faster and more interactive web application. AJAX uses asynchronous data transfer between the browser and server. This technique makes application faster lightweight and user friendly. It also allows the web page to request small bits of information from the server instead of whole page.

What is the basic goals of AJAX ?
The basic goals of Asp.net AJAX are :-
1. Reduce web server hits.
2. Reduce network load.
3. Interactive user Interface.
4. Platform and architecture neutrality.
5. Support for both synchronous and asynchronous communication.
6. Provide server and client side framework.

What are the advantages of Ajax?
Following are the advantages of Ajax:
1. Bandwidth utilization – It saves memory when the data is fetched from the same page.
2. More interactive
3. Speeder retrieval of data

What are the disadvantages of Ajax?
Following are the disadvantages of Ajax:
1. AJAX is dependent on Javascript. If there is some Javascript problem with the browser or in the OS, Ajax will not support
2. Ajax can be problematic in Search engines as it uses Javascript for most of its parts.
3. Source code written in AJAX is easily human readable. There will be some security issues in Ajax.
4. Debugging is difficult
5. Increases size of the requests
6. Slow and unreliable network connection.
7. Problem with browser back button when using AJAX enabled pages.

What is synchronous and Asynchronous post back ?
The difference are as follows :
1. Asynchronous post back renders only the required parts of the page, where as synchronous post back renders entire page.
2. Asynchronous post back executes only one action at a time. Whereas  synchronous post back executes all action at a time.
3. Asynchronous postbox only modifies the update panel . where as synchronous post back modifies the entire page.

What are the technology are being used in AJAX ?
AJAX uses the following technology. They are :
1. JavaScript
2. XMLHttpRequest
3. Document object model (DOM)
4. XHTML and CSS.

What is the limitation of AJAX ?
There are some limitation of AJAX which are as follows :
1. It is difficult to bookmark a particular stage of an application.
2. Function provided in code behind file does not work , Because the dynamic page cannot register themselves on browser history engine automatically.
3. If JavaScript is disabled then AJAX not able to perform any task.
4. Responsetime may be slow because different controls of page are loaded at different time.

No comments:

Post a Comment