3) In the big scheme of things if you are happy coding a traditional Java client, then there is no reason to switch to Ajax. If however, you are leaning towards a Web application and want a better user experience then Ajax answers those questions. Ajax gives you all of the advantages of the Web, without (mostly) the user interface problems that the Web traditionally had.
4) Please clarify as I don't seem to understand the question?
We are getting a few XML from various webservices. We are using XSL to show up the info. However, it is taking a lot of time to show up the page. Will Ajax be a better option to reduce the time taken to show up the page ?
Oh, you are doing client side XSL? Ouch, that can hurt if the data set is large enough.
If you are getting your data in XML, and then doing an XSL transformation there are several things that can hurt. First the XSL transformation can be problematic, but so can the injection of the resulting HTML into the HTML page.
I would like to know what techniques are you using on the client side?
Using Ajax you may or may not get a performance boost. Using Ajax the following steps would be carried out.
1) Client makes XMLHttpRequest request 2) Web server sends XML data to client 3) XMLHttpRequest receives the data and if the data is marked as XML will generate an XML DOM (Performance point #1) 4) Client iterates XML DOM to find elements it wants (Peformance hit #2) 5) Client finds XML element instantiates new HTML objects or injects HTML text (Performance hit #3)
The performance hits might be less than running an XSLT transformation, but I would be wary of saying that you will get a massive performance increase.
Instead what I would do is implement an Infinite Data pattern strategy. Using the Infinite Data pattern strategy you are fed on a piecemeal basis the results. Doing a search of Google is an example of Infinite Data in that Google does not give you all of the results at once. You need to page through the results. And as you page through the results more content is generated.
If you want to exchange source code so that I can help you at a technical level send me a private message and we can continue from there.
Author of Ajax Patterns and Best Practices
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad: