« first  « prev 

Jump to:


Conclusions and Downloads

1. Conclusions


An AJAX based web application uses client-side JavaScript to fetch and parse XML data and uses this data to update the HTML page in situ. In this article we've seen two web applications which use different technologies but share the key features of AJAX.

1.1. AJAX Pros and Cons


The pros: We've covered this to death really, AJAX applications are faster and more user friendly because they can refresh small bits of data without having to refresh everything. AJAX based pages also use less bandwidth, because site "furniture" doesn't need to be refreshed each time the user changes the data view.

The cons: AJAX applications break the natural flow of a web page. That can be a problem since users expect their back button to take them to the last thing they looked at and might not get the hang of a website where that isn't the case. That said, however, forms have the similar problems and haven't exactly vanished from the web! You have to decide whether the trade-off between standards compliance and bandwidth/speed is worth it.

In the end, every application needs to be judged on its own terms. I doubt that Google Maps would be as good without its massive use of AJAX, but on the other hand, forums and suchlike seem to function very well using full postbacks.

1.2. Other data formats


The observant will have realised by this point that there is no real need to use XML as the data format for transfering data between server and client. We could use any text format, for example CSV, HTML or even some kind of compressed or encrypted data format of our own. Some people like to transfer streamed JavaScript objects or even JavaScript code which they then execute on the client.

I am a big fan of XML, so I've never even thought of using another technology. With XML you can add new fields without disrupting existing code, you can check validity easily and cope well with errors. XML is also very simple to parse and doesn't have the security problems associated with sending executable code around the place.

That said, don't let me stop you if you really want to use another data format!

2. Downloads


WebDataServer.zip

PaperbasedWebService.zip

« first  « prev 

Jump to: