Mistakes About Ajax Mistakes
- By Matt Stephens
Alex Bosworth posted a list of "typical" mistakes Ajax developers make, and invited readers to add their own Ajax mistakes onto an ever-growing list.
Many of these are good and valid traps that both "vanilla" web programmers and "pistachio" Ajax programmers should be aware of. But a lot of them also sadly miss the point of Ajax, which we’ll come to in just a moment.
Here’s a spoof of Jacob Nielsen’s 1996 article "Why Frames Suck". The spoof article for the most part substitutes the word "frames" with "Ajax", and makes the point that pretty much all of Nielsen’s points hold true for Ajax. Their main point is that the "social filtering" power of URLs breaks down with Ajax (as it did with frames back in 1996), because when you bookmark a page or email the link to someone, the URL you send won’t load up the same page state that you’re currently looking at.
Another point made in the spoof article is that search engines have trouble with Ajax (as they did with frames back in... etc etc), because they don’t know what page states to include as navigation units in their index.
The spoof is all very clever n’all, but what the spoofer has missed is that Ajax is purposed for web applications, not for web pages. Of course it’s a spoof so it’s beyond criticism(!), but many of the "Ajax mistakes" posted to Alex Bosworth’s blog also appear to miss the same essential point.
We're all agreed that you shouldn't criticize an elephant for falling off a tightrope; and Ajax shouldn't be criticized (much) for being unsuitable for websites.
Try reading through the spoof article linked above, and Bosworth’s Ajax Mistakes page, whilst telling yourself repeatedly: “Ajax is for web applications, not web pages!” It’s surprising how many of the points suddenly lose their pointiness.