Ajax interview questions

6.Q:What advantages and disadvantages can we find in Ajax?

A:a)Advantages

Usually the pages in a website have the same type of content which has to be reloaded every time a request is made if we used the classical methods. Things improve when we use Ajax because only the content that requires updating will be sucessed . This will mean less loading time and less used bandwidth. The user interface will become more interactive and the section of web pages will become reloadable each alone all this due to asynchronous request usage.

b)Disadvantages

We could not be able to use the back button of the browser to see the last Ajax based page, however we will see the last before the Ajax based one, this is because when we use successive Ajax requests for building dynamic web these requests don’t register automatically in the history of the browser. For many changes in the history we can use invisible Frames. Also bookmarking a specific state of dynamic updates of a page. Using JavaScript stops crowers from indexing a page and different other methods have to be used, and if a browser is not JavaScript or Ajax compatible or it has them deactivated will not use this alternative. The same mobile phones or other mobile devices can’t read JavaScript pages or don’t display the content in a dynamic way.

7.Q:Which are the trigger types that we find in update panel?

A:The types or triggers are in member of two: PostBackTrigger and AsynPostBackTrigger. The first one makes a complete postback. It doesn’t work asynchronously, the second one makes a practical postback and this is working asynchronously.

8.Q: How can JavaScript be debugged?

A:Right now the number of utilities that are compatible with both client and server debugging is small, but this could change over time. The debugging is currently made in separate way. Some of the client debuggers for some popular browsers are presented below: the Venkman debugger is a built-in feature of Netscape/Mozilla browser and also there is an add-on called FireBug, also the browser Safari has a similar debugger that can be used by activation and Internet Explorer has some methods of debugging JavaScript. A common method used by debuggers is “Alert Debugging” with the function “alert()”.

9. Q:What are the protocols and forms in Ajax?

A:XMLHttpRequest, this protocol is meant for doing requests to a server. The client browser makes an object, the transfer of data happens in JSON or plain text. The JSON format can be parsed by Javascript and will be compatible with every browser.

10.Q: Do we have to use HTTP GET/POST for the Ajax calls?

A: If the data doesn’t change for a particular request URL, HTTP GET requests are necessary. If the state on a server is going to be updated then a HTTP POST is necessary.

11.Q: Easy trough that the classical web applications are harder to make than Ajax applications?

A: Not really, because the code that has to run on the client is complicated and it is hard to create such a code, without having bugs and we need the aid of many tools of an efficient code.

12.Q: Why is HTML_AJAX having stability issues on some installations?

A: If the problem that we have with is specific to certain servers the best explanation would be that the problem relates to output compression. It can be dictated and fixed PHP config but if it is a related apache extensions it is almost impossible to be detected properly. In most cases we will have to disable the AJAX extension, but in rare cases we can fix the issue by using the setting sendContentLength to false. Also XDdebug can create some issues but they can be fixed by the activating the extension.

13.Q: I it true that AJAX is code browser compatible?

A: Yes but only partially. The majority of browsers give us a built-in XMLHttpRequest JavaScript object but some, like Internet Explorer, will asked it in the form of an ActiveX object.

14.Q: Is it true that a XMLHttpRequest objects belongs to the W3C standard?

A: This hasn’t been decided until now but we know just that it belongs to DOM Level 3 Load and Save.

15.Q: What meaning has ASP.NET Ajax?

A: ASP.NET Ajax is developed by Microsoft and it represent the free Ajax frame work used for creating applications that have a great amount of interactivity and is compatible with all the browsers. It gives us the possibility to chose our own way of using Ajax no matter if is Server-side, Client-side, the Query library or the Ajax Control Tool kit.

16.Q: What are the browser versions that Ajax is compatible with?

A: From the version 0.3.0 Ajax is compatible with Internet Explorer 5.5, Mozilla Firefox 1.0, Safari 2+ and Opera 8.5+.

17.Q: In what way are proxyless calls different than the proxied calls in Ajax?

A: Proxyless calls can be possible using functions such as HTML_AJAX.replace() or HTML_AJAX.append(). This functions are JavaScript utilities. Proxied calls are possible by using imitations of PHP classes or stub objects in JavaScript.

18.Q: How can we make a mashup with Java by accessing other domains data?

A: We can gain access to other domains data in our Java Script clients if the format of the data returned is in JSON format. In this way JavaScript client can be made which is running with the usage of another servers data, method called JSON with Padding (JSONP). This method has his doubts when it comes to security, because it functions by bringing data from outside our domain, but the execution is made inside. Not every type of data from outside can be accessed as JSON and sometimes we want more security.

In Java a proxy can be given to outside services with the aid of what we called a servlet, which is used for communication management between outside and inside services and gives us the possibility of changing the format of the data we provide according to our wishes. For speed improvement data can be cached.

Leave a Reply

Your email address will not be published.