1. What is Ajax?
Ajax stands for Asynchronous JavaScript and XML. It is a latest and more efficient technique for asynchronous data transfer between browser and web server. It allows to send and receive data without reloading web browser, therefore, it is a fast technique.
2. What are the advantages of Ajax?
- Data is retrieved fast as only important information are sent to server.
- It makes applications fast and interactive.
- Bandwidth utilization
3. What are the disadvantages of Ajax?
- It is JavaScript dependent. If JavaScript is disabled in browser, ajax will not function.
- Source code of ajax is human readable due to which security problem can occur.
- Debugging is difficult
- Accessibility issues. As ajax disable backward/forward buttons due to which accessibility of website is affected.
4. Give the examples of application of ajax?
Most web applications use ajax technology like Gmail, Twitter, Facebook etc.
5. How ajax works?
User send request from a browser where JavaScript is enabled. XMLHttpRequest object receives call and sent it to server. Server retrieves data and sends XML or JSON data back to HMLHttpRequest callback function and data is shown to user on browser.
6. What is XMLHttpRequest object?
It is used for asynchronous transfer of data between browser(client) and web server.
7. What are the goals of Ajax?
- Reduce the traffic travels between the client and the server.
- Faster response time
- Reduced Network load
- Interactive user interface
- Improved performance by negating page postback.
- Support for synchronous as well as asynchronous communication
- Provision of server-side and client-side frameworks.
8. What technologies are used by Ajax?
AJAX uses following the technologies.
- Document Object Model (DOM) :
- JavaScript
- XMLHttpRequest
- Hypertext Markup Language (HTML)
- Extensible HTML (XHTML)
- Cascading Style Sheets (CSS)
9. What are the controls of Ajax?
Ajax has following core controls.
- UpdatePanel
- UpdateProgress
- ScriptManager
- ScriptManagerProxy
- Timer control
10. What is UpdatePanel control?
UpdatePanel allows rendering partial page. You can refresh important parts of the page instead of refreshing whole page.
11. What is UpdateProgress control?
UpdateProgress control shows the progress for all partial-page updates on the page. You can use an UpdatePanel control for every UpdateProgress control.
12. What is ScriptManager control?
There is only one ScriptManager control in one page. It registers ajax library scripts for that page. It also creates proxies for asynchronous web service call.
13. What is ScriptManagerProxy control?
As mentioned above there is only one ScriptManager control in one page but the page can have multiple ScriptManagerProxy controls. If you have the ScriptManager in master page which will go across all pages, you cannot add another ScriptManager to underlying pages, instead ScriptManagerProxy control would be added to those underlying pages otherwise the page would show error.
14. What is timer control in ajax?
Timer control allows you to do postbacks at certain intervals. It allows timed partial updates page when used with UpdatePanel control.
15. What is JSON in Ajax?
JSON is an abbreviation of JavaScript Object Notation. Data exchange is faster than XML and is easy to understand.
16. What is the name of the DLL that contains Ajax control tool kit?
Ajaxcontroltoolkit.dll contains Ajax control toolkit.
17. What are types of postback in Ajax?
There are two types, synchronous postback and asynchronous postback.
18. What is the difference between synchronous and asynchronous postback?
In case of synchronous postback, complete web page is sent to server while only important information are sent to server in asynchronous postback.
19. What is server-side ajax framework?
It helps in developing Ajax functionality and supports server controls and components.
20. What is client-side ajax framework?.
It allows developing web applications having rich user interactivity. It includes set of java libraries which are independent of ASP.NET
21. What methods are used in cross domain Ajax calls?
Following two methods are used for cross domain ajax calls.
- Cross Origin Resource Sharing(CORS) works with the HTTP web browsers.
- JSON with Padding(JSONP) works with the HTTP GET and on legacy browsers.
22. What are the components of ASP.NET Ajax Client Library?
Ajax client library contains following components.
- Component Layer
- Core Services Layer
- Browser Compatibility Layer
23. What are extender controls?
Extender controls uses JavaScript code to enhance client functionality of ASP.Net. For example, time picker is an extender control which is used to input time.
24. Which browsers support AJAX?
Following browsers support AJAX:
- Microsoft Internet Explorer 5 and above.
- Mozilla Firefox 1.0 and above.
- Netscape 7.1 and above.
- Apple Safari 1.2 and above.
- Opera 7.6 and above.
25. How can AJAX applications be debugged?
Two tools are used for debugging:
26. What are the protocols used by Ajax?
- XMLHttpRequest
- HTTP’s GET or POST
- URL encoded data
- JSON for communication between client and server.
27. What are some common ajax framework?
- MooTools: It is one of the popular JavaScript toolkits which is primarily used for creating visual effects.
- Google Web Toolkit (GWT): It enables developers to create rich Ajax applications using Java.
- Dojo Toolkit: It is most popular toolkit and used in large number of applications. It is a modular JavaScript toolkit which is distributed under an open-source license. Dojo toolkit includes many user interface effects, widget APIs, drag and drop AISs etc.
- Yahoo User Interface(YUI): YUI library is an open source JavaScript framework and is used to make interactive applications.
- Spry: This framework was developed by Adobe. It consists of animation and visual effects components, a data binding component, and a framework to crate widgets.
28. What is rich internet application (RIA)?
It is a web application which has many characteristics of desktop application software. It has quick response time and many advanced functions. An RIA is browser dependent or require browser plugin or a virtual machine to deliver user application.
29. What are features included in Microsoft Ajax library?
- Imperative syntax
- Script loader
- Client data access
- Client data context
- ADONetDataContext