Interview Questions.

Ajax Interview Questions and Answers


Ajax Interview Questions and Answers

Q1. What is supposed by using Ajax?

Ans: Ajax is abbreviated as Asynchronous Javascript and XML. It is new approach used to create better, quicker and greater interactive net structures or programs. Ajax makes use of asynchronous information switch among the Browser and the web server.

This technique is used to make internet faster and user pleasant. It isn't always a programming language.

Q2. What are Ajax programs?

Ans: Browser primarily based programs and platform independent programs are used by Ajax.

Q3. What are the benefits of Ajax?

Ans: Following are the blessings of Ajax:

1. Bandwidth usage

2.It saves memory when the statistics is fetched from the equal web page.

Three. More interactive

4.Speeder retrieval of statistics

Q4. What is JSON in Ajax?

Ans: JSON is abbreviated as JavaScript Object Notation. JSON is a safe and reliable information interchange format in JavaScript, which is easy to apprehend for both customers and machines.

Q5. What are the risks of Ajax?

Ans: Following are the negative aspects of Ajax:

1. AJAX is dependent on Javascript. If there is a few Javascript trouble with the browser or in the OS, Ajax will not assist.

2. Ajax may be problematic in Search engines because it uses Javascript for maximum of its elements.

3. Source code written in AJAX is effortlessly human readable. There can be some security troubles in Ajax.

Four. Debugging is hard (not impossible)

five. Increases length of the requests

6. Slow and unreliable community connection.

7. Problem with browser lower back button while using AJAX enabled pages.

Q6.  What are all the technology utilized by Ajax?

Ans: AJAX makes use of following technologies:



Document Object Model (DOM)

Extensible HTML (XHTML)

Cascading Style Sheets (CSS)

Q7. Is AJAX code cross browser well matched?

Ans: Not completely. Most browsers provide a native XMLHttpRequest JavaScript item, while every other one (Internet Explorer) require you to get it as an ActiveX item

Q8. What are the safety issues with AJAX?

Ans: The Ajax calls are sent in simple textual content format, this could cause insecure database access. The records gets stored on the clients browser, as a result making the statistics to be had to every body. It also lets in tracking browsing sessions by placing scripts.

Q9. How can you test the Ajax code?

Ans: JSUnit is the customer facet javascript code used as part of JUnit. JSUnit has been used for Ajax code.

Q10. What Is the Format of an AJAX Request?

Ans: An AJAX request may be in any layout:

1. Text File


three. JSON object

Q11. Where Should I Start?

Ans: Assuming the framework you're the usage of does no longer suffice your use instances and also you would love to develop your very own AJAX components or functionality I endorse you begin with the item Asynchronous JavaScript Technology and XML (AJAX) With Java 2 Platform, Enterprise Edition. If you would love to look a very basic example that includes source code you may test out the tech tip Using AJAX with Java Technology. For a extra entire listing of AJAX sources the Blueprints AJAX Home web page.Next, I would propose spending some time investigating AJAX libraries and frameworks. If you pick to jot down your personal AJAX clients-side script you are an awful lot higher off no longer re-inventing the wheel.

AJAX in Action by way of Dave Crane and Eric Pascarello with Darren James is right resource. This book is beneficial for the Java developer in that in carries an appendix for getting to know JavaScript for the Java developer.

Q12. Is an AJAX Request Synchronous or Asynchronous?

Ans: AJAX requests are asynchronous with the aid of nature, because of this that they have to run in the background independently of different activities.

Q13. Does Ajax Work With Java?

Ans: Absolutely. Java is a incredible match for AJAX! You can use Java Enterprise Edition servers to generate AJAX purchaser pages and to serve incoming AJAX requests, control server side nation for AJAX customers, and join AJAX clients in your enterprise resources. The JavaServer Faces element version is a extremely good fit for outlining and using AJAX components.

Q14. How many sorts of triggers are found in replace panel?

Ans: There are two varieties of triggers utilized in replace panel:

1.PostBackTrigger : This works as complete postback and it cannot work asynchronously

2. AsyncPostBackTrigger : Partial put up returned asynchronously

Q15. What are all of the browsers aid AJAX?

Ans: Following browsers assist AJAX:

 Internet Explorer five.Zero and above

Opera 7.6 and above

Netscape 7.1 and above

Safari 1.2 and above

Q16. How are you able to discover that an AJAX request has been finished?

Ans: ReadyState belongings is used to test whether or not AJAX request has been finished. If the assets is equal to four, then the request has been finished and facts is to be had

Q17. Is It Possible To Set Session Variables From Javascript?

Ans: It's now not feasible to set any consultation variables at once from javascript as it's far basically a customer facet technology. You can use AJAX although to asynchronously...

Q18. Who Is Using Ajax?

Ans: Google is creating a massive funding in developing the Ajax method. All of the foremost merchandise Google has brought over the last year like Orkut, Gmail, the brand new beta model of Google Groups, Google Suggest, and Google Maps are Ajax applications. (For extra on the technical nuts and bolts of those Ajax implementations, check out these awesome analyses of Gmail, Google Suggest, and Google Maps.) Others are following healthy: a few of the features that people love in Flickr rely upon Ajax, and Amazon’s A9.Com seek engine applies similar techniques.

These projects display that Ajax is not handiest technically sound, but additionally sensible for real-global programs. This isn’t some other technology that handiest works in a laboratory. Ajax packages can be any size, from the very simple, unmarried-characteristic Google Suggest to the very complicated and complex Google Maps.

At Adaptive Path, we’ve been doing our very own work with Ajax over the past numerous months, and we’re understanding we’ve only scratched the floor of the wealthy interaction and responsiveness that Ajax packages can provide. Ajax is an critical improvement for Web applications, and its significance is growing. The biggest challenges in creating Ajax packages aren't technical. The core Ajax technologies are mature, strong, and properly understood. As there are such a lot of builders accessible who already realize how to use these technology, we expect to peer many more corporations following Google’s lead in reaping the competitive benefit Ajax presents.

The demanding situations are for the designers of those packages to forget about what we think we recognise about the constraints of the Web, and begin to imagine a much broader, richer range of opportunities

HubSpot Video

Q19. Do Ajax Applications Always Deliver A Better Experience Than Traditional Web Applications?

Ans: Not necessarily. Ajax gives interplay designers extra flexibility. However, the more electricity we've got, the greater warning we need to use in exercise it. We have to be careful to use Ajax to decorate the consumer revel in of our programs, not degrade it.

Q20. Are Ajax Applications Easier To Develop Than Traditional Web Applications?

Ans: Not necessarily. Ajax programs inevitably contain strolling complex JavaScript code on the customer. Making that complicated code efficient and trojan horse-free is not a venture to be taken gently, and higher development equipment and frameworks can be had to help us meet that mission.

Q21.Cannot Parse Xml Generated By Jsp I Am Generating An Xml Using Jsp, When I Run The Jsp In Ie It Shows The Xml As Per Dom, But When I Try To Parse It Using Javascript , The Command Xmldoc.Documentelement ?

Ans: This is running code, it would assist you.

If (!IsIE)

xmldoc = req.ResponseXML;



Q22.What are all of the distinctive records sorts that JSON helps?

Ans: JSON supports following facts types:







Q23. Do I Really Need To Learn Javascript?

Ans: Basically sure in case you plan to develop new AJAX capability for your net software. On the alternative hand, JSF components and aspect libraries can abstract the details of JavaScript, DOM and CSS. These additives can generate the important artifacts to make AJAX interactions possible. Visual gear consisting of Java Studio Creator may use AJAX enabled JSF components to create programs, protective the tool developer from some of the details of AJAX. If you intend to expand your personal JSF components or wire the activities of components collectively in a device it's far crucial which you have a simple know-how of JavaScript. There are customer-facet JavaScript libraries (discussed underneath) that you could call from your in page JavaScript that summary browser variations. Object Hierarchy and Inheritance in JavaScript is a extremely good resource for a Java developer to learn about JavaScript gadgets.

Q24.What Is The Difference Between Proxied And Proxyless Calls?

Ans: Proxied calls are made via stub items that mimic your PHP lessons at the JavaScript aspect. E.G., the helloworld magnificence from the Hello World instance.

Proxyless calls are made the usage of application javascript functions like HTML_AJAX.Update() and HTML_AJAX.Append().

Q25. Did Adaptive Path Invent Ajax? Did Google? Did Adaptive Path Help Build Google's Ajax Applications?

Ans: Neither Adaptive Path nor Google invented Ajax. Google’s recent merchandise are genuinely the highest-profile examples of Ajax programs. Adaptive Path changed into now not worried inside the development of Google’s Ajax programs, but we were doing Ajax work for some of our different clients.

Q26. Won't My Server-facet Framework Provide Me With Ajax?

Ans: You may be making the most of AJAX already. Many present Java primarily based frameworks already have some level of AJAX interactions and new frameworks and aspect libraries are being advanced to offer higher AJAX help. I might not list all the Java frameworks that use AJAX here, out of worry of lacking someone, but you may discover a accurate list at www.Ajaxpatterns.Org/Java_Ajax_Frameworks.

If you haven't chosen a framework yet it is advocated you do not forget the usage of JavaServer Faces or a JavaServer Faces based totally framework. JavaServer Faces components may be created and used to abstract some of the info of producing JavaScript, AJAX interactions, and DHTML processing and for this reason permit simple AJAX used by JSF utility developer and as plug-ins in JSF compatible IDE's, which includes Sun Java Studio Creator.