Please wait while the page is being loaded Skip this advertisement >
Saturday | 6 December, 2008
Learning the basics of AJAX
All you need to know about AJAX
David Cartwright (Techworld) 19/10/2006 13:39:15

First, no matter how fancy the back-end functionality of your program is, there are limitations to what you can do with a browser in terms of screen output: you'll always be able to do more with a desktop application using native graphics libraries. Additionally, when you consider how abysmally the majority of browsers deal with graphical concepts such as CSS2 you have some more limitations with what you can do graphically.

Second, there's JavaScript and there's JavaScript. In some ways JavaScript is a maligned language, regarded as the slightly sickly little brother of Java - yet it's actually quite an extensive language (something I first realised when I noticed that the JavaScript book I'd bought was the same thickness as the VB.NET). Trouble is, though, different browsers have subtly different ways of representing data in JavaScript - the classic example being that browser A might represent a year as a physical number (so this year would be 2006) while browser B represents it as a number of years since 1900 (making this year 106). So you have to program your way around the differences. Worse still, this issue applies to other aspects of browsers such as CSS: a colleague I worked on a project recently rarely stopped moaning that half this job was writing the bits of code that said: "If the client browser is X, do this, or if it's Y do that, ...".

Finally, although it's true that JavaScript is a surprisingly rich language, it was devised as a way of extending browser functionality, not really as a stand-alone application development language. This means there'll always be some element of trying to achieve what you want despite JavaScript's functionality, not because of it.

Conclusion

Notwithstanding these downsides, though, AJAX is a bloody brilliant concept. It uses features that have been included in browsers for donkey's years (Noah used IE5, after all) and the XmlHttpRequest object is straightforward to use, even if you do have to expend a bit of effort bundling and unbundling XML stuff at each end. Not only this, but as it grows in popularity there's a growing amount of software being produced that makes it simpler to write AJAX applications: even Microsoft has leapt on the bandwagon with its Atlas Project which is rarely a bad sign for developers,

As with any programming language or development system, AJAX isn't right for every application. But for something that works, UI-wise, as a browser-based system but could benefit from more page interactions with less waiting for page loads, it's well worth a look.

Computerworld Buyer's Guide - Vendors Matched to this Article
More about Microsoft, Brother
Computerworld Buyer's Guide - Vendors Matched to this Article
Additional Resources
Executive Guides
Whitepapers
Zones
Zone logoZones provide focussed content from Computerworld and leading technology partners.
Newsletter Subscription
Sign up for our Computerworld newsletters!
RSS Feeds
Market Place

 

Smart SOA World Tour

Discover how SOA can create smarter outcomes for your business.

Attend and learn:

  • How SOA is helping leading companies to become more agile
  • Where you should be applying SOA processes in your company
  • The top SOA implementation mistakes to avoid

Click here for more information.
Whitepaper

Refresh your AUP: Top tips to ensure your acceptable use policy is fit for purpose

Your organisation may well have devised and implemented an Acceptable Use Policy (AUP) some time ago in order to guard against the risks of inappropriate use of computer systems by your workers, but are you confident that your AUP remains 'fit for purpose'? Read on to discover how you can enhance the effectiveness of your AUP.

Enterprise IT Buyer's Guide
Find Technology Vendors Fast
 
Find vendors by name | Find by category
Sponsored Links