Ajax interview questions and answers

          

Ajax interview questions and answers


Ajax interview questions for experience
What is AJAX and what problem does it solve?

Answer - Ajax is a set of client side technologies that allows asynchronous communication between...............
Read answer

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..................
Read answer

What is the disadvantage of AJAX?

The disadvantages of AJAX are: Search engines would not be able to index an AJAX application..............
Read answer

How is encoding handled in AJAX?

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

Why is AJAX a comfortable fit with JAVA?

AJAX is a comfortable fit because, using Java Enterprise Edition the following tasks can be performed:.............
Read answer

What is synchronous request in AJAX?

Synchronous AJAX is a process that makes a java script to halt or stop the processing an application until a result is sent by a server. The browser is frozen, while the request...............
Read answer

When should I use a Java applet instead of AJAX?

Applets provide features like custom data streaming, graphic manipulation, threading, and advanced GUIs which AJAX cannot..................
Read answer

How Ajax is different?

An AJAX application introduces a layer between the user and the server which comprises of the AJAX engine. This eliminates the adhoc interaction between the client.............
Read answer

Is the server or the client in control in AJAX?

With AJAX the control can be more centralized in a server-side component or a mix of client-side and server-side controllers...............
Read answer

Are there Usability Issues with AJAX?

The nature of updating a page dynamically using data retrieved via AJAX interactions and DHTML may result in drastically changing the appearance and state of a page...................
Read answer


Ajax Interview questions with answers posted on August 12, 2008 at 18:00 pm by Rajmeet Ghai
Explain ASP.NET Ajax Framework.

Answer - ASP.NET Ajax Framework is used for implementing the Ajax functionality......
Read answer

Explain limitations of Ajax.

Answer - Back functionality cannot work because the dynamic pages don’t register themselves to the browsers history engine..........
Read answer

What is the role of Script Manager in Ajax?

Answer - Script Manager, as the name suggests is used to manage the client side script of Ajax.............
Read answer

List out differences between AJAX and JavaScript.

Answer - Ajax is Asynchronous Java Script and XML. Here on sending request to the server, one needn’t wait for the response.................
Read answer

Describe how to create AJAX objects.

Answer - Ajax Objects can be created by the following syntax:.............
Read answer

Define JSON.

Answer - JSON is JavaScript Object Notation. JSON is a safe and reliable data..........
Read answer

Explain in brief abo XMLHttpRequest object

Answer - XMLHttpRequest object is used to transfer data between a client and a server.......
Read answer

Describe the formats and protocols used by AJAX.

Answer - Ajax uses HTTP’s GET or POST. AJAX also uses XMLHttpRequest protocol for requesting to the web server...............
Read answer

What are the security issues with AJAX?

Answer - AJAX function calls are sent in plain text to server. These calls may easily reveal database...............
Read answer

Describe how to handle concurrent AJAX requests.

Answer - JavaScipt Closures can be used for handling concurrent requests. A function can be written.............
Read answer

When should AJAX NOT be used?

Answer - If the page is expected to be shown in a search engine like Google. Since Web crawlers don’t execute...............
Read answer

How do you know that an AJAX request has completed?

Answer - By determining the readyState property value of XMLHttpReqyest, One can know if the request...............
Read answer

How do I handle the back and forward buttons?

Answer - In order to store changes in the browsers web history (enabling back and forward buttons)..............
Read answer

Test your .NET/Java skills!

ASP.NET (41 questions)
C#.NET (38 questions)
VB.NET (33 questions)
.NET Framework (26 questions)
ADO.NET (10 questions)
Java part 1 (39 questions)
Java part 2 (40 questions) 

Ajax interview questions posted by Madhavi  on May 05, 2011

Explain AJAX in detail.

AJAX stands for Asynchronous JavaScript and XML.

AJAX is a technique for creating fast and dynamic web pages. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Is is possible to implement Ajax in browsers that do not support the XmlHttpRequest object?

Yes by using ActiveXObject, it is possible to implement AJAX in browsers that do not support the XmlHttpRequest object.

Explain limitations of Ajax.

Limitations of AJAX:

1)Browser Integration
The dynamically created page does not register itself with the browser history engine, so triggering the "Back" function of the users' browser might not bring the desired result.

2)Response-time Concerns
Network latency - or the interval between user request and server response - needs to be considered carefully during Ajax development.

3)Search Engine Optimization (SEO)
Websites that use Ajax to load data which should be indexed by search engines must be careful to provide equivalent Sitemaps data at a public, linked URL that the search engine can read, as search engines do not generally execute the JavaScript code required for Ajax functionality 4)Reliance on JavaScript Ajax relies on JavaScript, which is often implemented differently by different browsers or versions of a particular browser. Because of this, sites that use JavaScript may need to be tested in multiple browsers to check for compatibility issues.

What is the role of ScriptManager in Ajax?

ScriptManager is a class and a control in Ajax.

The ScriptManager class in ASP.NET manages Ajax Script Libraries, partial page rendering functionality and client proxy class generation by creating an instance of the Ajax runtime on the browser, for web applications and services.

The ScriptManager control (that we may drag on a web form) is actually an instance of the ScriptManager class that we put on a web page. The ScriptManager manages all the ASP.NET Ajax controls on a web page.

Which request is better with AJAX, Get or Post?

AJAX requests should use an HTTP GET request while retrieving data where the data does not change for a given URL requested. An HTTP POST should be used when state is updated on the server. This is in line with HTTP idempotency recommendations and is highly recommended for a consistent web application architecture.

List out browsers that support AJAX.

All the available browsers can not support AJAX. Here is the list of major browsers which support AJAX.

1. Mozilla Firefox 1.0 and above
2. Netscape version 7.1 and above
3. Apple Safari 1.2 and above.
4. Microsoft Internet Exporer 5 and above
5. Konqueror
6. Opera 7.6 and above

What are the different frameworks available In AJAX?

The following is a list of notable Ajax frameworks, used for creating web applications with a dynamic link between the client and the server.

Some of the frameworks are JavaScript compilers, for generating JavaScript and Ajax that runs in the web browser client;

Some are pure JavaScript libraries. Others are server-side frameworks that typically utilize JavaScript libraries.

1. JavaScript frameworks are browser-side frameworks very commonly used in Ajax development. There are hundreds of JavaScript frameworks available.E.g. jQuery

2. Java frameworks used for server-side Ajax operations: E.g. Apache Wicket

3. C++ : E.g. Wt - a C++ Web Toolkit

4. .NET : The following frameworks are available for the Windows .NET platform: e.g. ASP.NET AJAX (previously Microsoft Atlas)

5. PHP : A PHP framework is able to deal with database, search data, and build pages or parts of page and publish the page or return data to the XMLHttpRequest object. E.g. Quicknet is an Ajax framework that provides secure data transmission, uses PHP on the server side

6. Python : These frameworks use Python for client-side Ajax operations:

E.g. Pyjamas, a widget library with a Python to JavaScript compiler

7. Ruby : The Ruby on Rails framework implements a Domain- specific language named RJS, which can be used to write Ruby code that generates Javascript code.

Does AJAX work with Java?

Absolutely. Java is a great fit for AJAX! We can use Java Enterprise Edition servers to generate AJAX client pages and to serve incoming AJAX requests, manage server side state for AJAX clients, and connect AJAX clients toy our enterprise resources. The JavaServerFaces component model is a great fit for defining and using AJAX components.

Write your comment - Share Knowledge and Experience

Discussion Board
Ajax interview

Thanking for sharing these questions on Ajax. It is quite helpful

vinod 05-19-2013 07:45 AM

Ajax Interview Questions

Great list of questions!.

Find out some more questions here i found http://codershelpdesk.com/2012/06/16/ajax-interview-questions-part-i/

Sunny 06-16-2012 12:49 PM

Ajax interview questions and answers.

How to control how long an Ajax request may last?

We can use the triggers of Script Manager or the property of AsyncPostBackTimeout to control the web page and the request which is being made to the server. A timed out request will be published when the page no longer remains available for debug. Example Code:

<asp:ScriptManager id="ScriptManager1" runat="server" AsyncPostBackTimeout="9000"/>

[Note: the values here are in seconds]

What is the ASP.NET Ajax Framework? What versions have been released so far?

ASP.NET Ajax Framework is a free framework that gets implemented for web applications. This provides lot of tools to create easy to use, efficient and interactive web applications that work on all the platforms and browsers. This framework includes reusable Ajax controls, access remote service methods, data accessing methods etc. The version which has been released till now is as follows:-

1 - ASP.NET Ajax Framework 1.0 (earlier release to this was called the Atlas)
2 - ASP.NET Ajax Framework 1.0 for ASP.NET 2.0


Rohit Sharma 12-11-2011 05:29 AM

Ajax interview questions and answers.

What are the properties of the XmlHttpRequest object?
XmlHttpRequest is an API, used in scripting language such as JavaScript. It sends HTTP and HTTPS requests directly to the server and load the server response directly in the script. The properties of it are as follows:

onreadystatechange property: it is a special property that processes the responses from the server. Example code:

ajaxRequest.onreadystatechange = function()

{// code}

readystate property: status of server’s response is stored. Example code:

ajaxRequest.onreadystatechange = function()

{if(ajaxRequest.readyState == 4)

{// Code to get the data from server}

}

responsetext property: retrieval of the server response can be seen by this property. Example code:

ajaxRequest.onreadystatechange = function()

{if(ajaxRequest.readyState == 4)

{document.myForm.time.value = ajaxRequest.responseText;}

}


Rohit Sharma 12-11-2011 05:26 AM

Ajax interview questions and answers.

How do I create a thread to do AJAX polling?
JavaScript as an integral part of AJAX, it works when an event happens or an action is being taken such as page load, mouse click etc. A timer can be set to take the function name and time as arguments. A thread will be created, the moment the function checkforMessage() will be called. The thread will continue to execute and the result of it will be pooled in the database. Example code:

Function checkForMessage()
{
// start AJAX interaction with processCallback as the callback function
}
// callback for the request
function processCallback()
{
// do post processing
setTimeout(“checkForMessage()”, 10000);
}

How many types of triggers are there in update panel?
Triggers are the stored procedures used in the database. There are 2 types of triggers in update panel, which are as follows:

1. PostBackTrigger : This trigger is the internal trigger of the update control. It doesn’t work asynchronously. It short circuits the control to do synchronous post back. For example Update control panel

2. AsyncPostBackTrigger : This trigger is a control, that is external to update control. It works synchronously. It wires up the control to do asynchronous post back.


Rohit Sharma 12-11-2011 05:16 AM

Ajax interview questions and answers.

What are ASP.NET Ajax Extensions?
ASP.NET Ajax is a set of extensions developed by Microsoft in ASP.NET, to provide the functionality of AJAX. The extension provides configuration for localization and adaption without the use of Ajax. These are set of Ajax based controls that work in ASP.NET applications. It consists of the libraries to provide more support and functionality to applications. Few extension examples are:

ASP.NET Ajax Extensions 1.0 -> For ASP.NET 2.0

ASP.NET Ajax Extensions 3.5 -> For ASP.NET 3.5

What is the use of UpdatePanel Control?
UpdatePanel control is a server control that controls the updates of the web page without reloading, in ASP.NET. It can be done through a mechanism called as asynchronous postback. In this process, HTML of the page is sent by the server asynchronously through Ajax request. Triggers are used to control the content of it and allow refresh content to be loaded all the time. The example below shows that the content of the Update control is re-rendered every time the button is clicked.

<asp:Button ID="Button1" runat="server" Text="Refresh" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
<ContentTemplate>
<span><%= DateTime.Now %></span>
</ContentTemplate>
</asp:UpdatePanel>

Rohit Sharma 12-11-2011 05:14 AM

Ajax interview questions and answers.

How to handle concurrent requests in Ajax?

An array of XMLHttpRequest is used to create a new XMLHttpRequest that can be executed each time the concurrent request is being made. JavaScript allows more than one AJAX request to be executed at once. In this abstracted JavaScript object is being used in the form of XMLHttpRequest object. This object is named as AJAXInteraction. The function is shown below:

function AJAXInteraction(url, callback)

{ var req = init();
req.onreadystatechange = processRequest;

function init() {
if (window.XMLHttpRequest)

{ return new XMLHttpRequest(); }

else if (window.ActiveXObject)

{ return new ActiveXObject("Microsoft.XMLHTTP"); }

}

What is Dojo?

Dojo is a third-party JavaScript toolkit. It is used to create rich featured applications. It helps in saving time, increase the performance and deliver good result for the business. Dojo is an open source toolkit and also referred as “unified toolkit”. It is a DHTML toolkit which is good in solving difficult problems and it also helps developers to build easy to use web applications.


Rohit Sharma 12-11-2011 05:10 AM

Ajax interview questions and answers

Differentiate between proxied and proxyless calls.
- Proxied calls - These are made through stub objects that mimic your PHP classes on the JavaScript side.
- Proxyless calls - These are made using utility javascript functions like HTML_AJAX.replace() and HTML_AJAX.append().

Ajax is just another name for XMLHttpRequest - Is it true?
- No. XMLHttpRequest is just a part of the Ajax equation.

Harshvardhan 12-6-2011 04:54 AM

Ajax interview questions and answers

Is AJAX code cross browser compatible?
No, not absolutely. Most of the browsers offer a native XMLHttpRequest JavaScript object, while IE needs to get it as an ActiveX object.

Does Ajax work on web servers other than IIS?
Yes, it does. Ajax is independent of the web server on which web application is hosted.

What is the full form of AJAX?
AJAX - Asynchronous JavaScript and XML.

Prateek 12-6-2011 04:53 AM

Ajax interview questions and answers

Explain Comet.
Comet - applications where the server keeps pushing - or streaming - data to the client rather than the browser polling the server for fresh content.

What advantages does Ajax provide to Internet applications?
It makes them smaller, faster and more user friendly.

Explain AJAX polling.
Process of retrieving data from a server to obtain near-live data regularly.

Rachna 12-6-2011 04:53 AM

 

More Related Links
Understanding AJAX

AJAX is an acronym for Asynchronous JavaScript and XML. If you think it doesn't say much, we agree. Simply put, AJAX can be read "empowered JavaScript", because it essentially offers a technique for client-side JavaScript to make background server calls...........

What Is AJAX? History of AJAX, Advantages of AJAX

With AJAX, only the necessary data is transferred back and forth between the client and the web server. This minimizes the network utilization and processing on the client........

Technologies That Make Up AJAX

AJAX is a general umbrella term. AJAX itself stands for Asynchronous JavaScript And XML.................

What Is ASP.NET 2.0 AJAX?

AJAX-style communications between client and server. This communication is over web services. Asynchronous communication. All client-to-server communication in the ASP.NET 2.0 AJAX framework is asynchronous................

The components in the ASP.NET 2.0 AJAX packaging

ASP.NET AJAX Futures Community Technology Preview (CTP) — The ASP.NET 2.0 AJAX framework contains a set of functionality that is experimental in nature. This functionality will eventually become integrated with the RTM/Core code.

Potential benefits of using Ajax

AJAX makes it possible to create better and more responsive websites and web applications...............

Potential problems with AJAX

Search engines may not be able to index all portions of your AJAX application site.........

Who Benefits from AJAX?

AJAX is employed to improve the user’s experience. A request is made for the initial page rendering. After that, asynchronous requests to the server are made. An asynchronous request is a background request to send or receive data in an entirely nonvisual manner.............

What Is ASP.NET AJAX?

ASP.NET AJAX is the name of Microsoft’s AJAX solution, and it refers to a set of client and server technologies that focus on improving web development with Visual Studio...............

Other AJAX Libraries

The ASP.NET AJAX Framework can coexist with script and controls from other libraries, although given the dynamic nature of the JavaScript language, it is possible to extend types so that they conflict with each other.................

Balancing Client and Server Programming with ASP.NET AJAX

With AJAX, much of the logic surrounding user interactions can be moved to the client. This presents its own set of challenges. Some examples of AJAX use include streaming large datasets to the browser that are managed entirely in JavaScript..................

ASP.NET Interview questions part 3 includes following questions with answers
What is Shared (static) member? | What is the transport protocol you use to call a Web service? | What is Option Strict used for? | Define Boxing and Unboxing. | What does WSDL stand for? | Define ViewState in ASP.NET. | What is the lifespan for items stored in ViewState? | Define EnableViewState property. | What are Delegates? | What are Classes? | What is Encapsulation? | Different types of Session state management options available with ASP.NET? | What methods are fired during the page load? | Explain ADO.NET.
ASP.NET Interview questions part 4 includes following questions with answers
Define Server-side and Client-side code in ASP.NET. | What tag do you use to add a hyperlink column to the DataGrid? | Where does VS.NET store Web application projects? | Describe Web application’s life cycle | Define class module and a code module. | Steps to execute a stored procedure from Web Application | Describe exception handling in ASP.NET | What are the exception-handling ways in ASP.NET?
Structuring content in Plone
How to display information from data source in SharePoint site?

Here, we will learn to apply nice formatting to data that is displayed on our page. We will learn to do this by making use of Cascading Style Sheets. We will also learn how to format our data automatically, depending on the data values (a technique known as conditional formatting). Then we will learn to filter and sort our data, use formulae to perform calculations, and how to split our data up into multiple pages.

Rich user interfaces and AJAX 

Rich user interfaces can be achieved by using a combination of dynamic HTML elements such as HTML and JavaScript. However, the scope of such an interface is limited to client-side behavior and has minimal functional implications due to the lack of server-side interactions.

AJAX in JBoss portal 

AJAX has gained tremendous popularity in the traditional web application development world due to the richness and agility that it brings to user interfaces. Portals, such as JBoss portal, can also gain signifi cantly from AJAX, in terms of implementation of both behavior and functionality.

JSR-168 AJAX limitations

Before we look at the features and options provided by the new specifi cation, let's look at how traditional JSR-168 portlets functioned. As shown in the following fi gure, the "Action" request invoked the processAction method on the server, which implemented controller logic to route it to the correct view.

JSR-286 and AJAX

Among the set of features that the new portlet specifi cation JSR-286 introduces to make things easier for AJAX implementations, are the options to directly communicate with the portlet through shared render parameters and resource serving.

Developing an AJAX portlet

Implement AJAX functionality in one of the portlets, using asynchronous server calls and dynamic HTML.

AJAX support for markup

JBoss portal supports markup through tags on layouts and renderers of the pages. Special tags are added to layout JSPs that facilitate the placement of AJAX features on a page. Similarly, renderers are used to interpret the tags and to render AJAX-driven content. The obvious advantage is the in-built support for the auto-creation and control of AJAX components on portal pages.

AJAX support for content

Whereas the layout and renderer contribute to AJAX behavior at the markup level, JBoss portal's support for object-level confi guration can be leveraged to provide AJAX support at the page level. The object property inherits a confi gured behavior from its parent. Currently, two features are offered for AJAX-driven content

Considerations for AJAX implementations

Although AJAX is an exciting technology and provides signifi cant advantages in terms of performance, usability, and implementation, there are certain scenarios where using AJAX is not a good fi t. This is especially true when a lot of custom development is involved in using AJAX libraries.

Overview of ADO.NET architecture.

Data Provider provides objects through which functionalities like opening and closing connection, retrieving and updating data can be availed............. 

What are basic methods of Dataadapter?

This method executes the SelectCommand to fill the DataSet object with data from the data source...........  

Click here to share knowledge by answering these questions

  1. Explain AJAX in detail. 
  2. Explain ASP.NET Ajax Framework.
  3. Is is possible to implement Ajax in browsers that do not support the XmlHttpRequest object?
  4. Do AJAX technology work on web servers other than IIS?
  5. Explain limitations of Ajax.
  6. What is the role of ScriptManager in Ajax?
  7. Which request is better with AJAX, Get or Post?
  8. List out differences between AJAX and Javascript.
  9. List out browsers that support AJAX.
  10. What are the different frameworks available In AJAX?
  11. Are there any security issues with AJAX?
  12. Does AJAX work with Java?
  13. Is AJAX a programming language?
  14. Are Ajax applications easier to develop than traditional web applications?
  15. Describe how to create AJAX objects.
  16. Define JSON.
  17. What are the objects used by AJAX programs?
  18. Describe the basic fundamental of AJAX.
  19. Name the API functions that allow connection between the client and server.
  20. Describe when to use Java applet instead of AJAX.
  21. Which one should we use between HTTP GET or Post for AJAX calls?
  22. Is the server or the client in control in AJAX?
  23. Explain in brief about XMLHttpRequest object.
  24. Describe the formats and protocols used by AJAX.
  25. What AJAX framework do you recommend for PHP applications?
  26. What kinds of applications is Ajax best suited for?
  27. Describe how to handle concurrent AJAX requests.
  28. When should AJAX NOT be used?
  29. Explain how to test AJAX code.
  30. List out the differences between AJAX and JavaScript.
  31. What problem does Ajax solve?
  32. What are issues with AJAX?
  33. Is AJAX code cross browser compatible?
  34. How do you know that an AJAX request has completed?
  35. How do I handle the back and forward buttons?  

Click here to share knowledge by answering these questions

 
Latest placement tests
Latest links
 
 
Home | Want a Job? Submit Key Skills | Employer login | My key skills | About us | Sitemap | Contact us