Thursday, February 14, 2008

Ajax - the cons!

As a web application developer, I've finally matured past the initial googly-eyed excitement that Ajax brings. I don't think I need to enumerate the pros of AJAX technology, as it is this very excitement which turned a javascript-hack into a contemporary web application paradigm.

However, I would like to enumerate the cons. The browser, in which all web applications run, has many basic functions which all users have become familiar with. More importantly, these are functions which many even rely on.
  • The Back button
    • Whether you made a mistake, or are moving through a search list, you need your back back button.
  • The Refresh/Reload button
    • You need to refresh your current content for many reasons. Maybe you're waiting for a message in your inbox, maybe you're testing changes on an individual page. Maybe the complex web application your using is hanging up and you simply want to recapture your current view.
  • Bookmarking
    • URLs are hard to remember, and even harder to remember how you found out about them in the first place. Bookmarking is the solution.

These are all tools your browser provides by keeping track of your location in a website, and where you navigate to. But, what if your browser isn't aware of any of your navigation? All of your navigation was asynchronous, and all of this important work you've done existed within a
element somewhere on your page. What if you need to refresh, bookmark, or "go back" now? Well, then you're just S.O.L.
  • The "Back" button will likely try to exit the current website altogether and bring you to your previous website.

  • Your "Refresh" button will refresh the entire page to it's original view, regardless of what important tasks you accomplished asynchronously within a block level element on the page somewhere.

  • Your "Bookmark" will behave similarly.
Depending on your server-side technology, many other complications can come into play, regarding troubleshooting. Additionally, AJAX is a mighty magic to wield, so with it comes much responsibility; breaking away from good usability standards is all too easy to do once you're "having fun" with AJAX.


Is it worth it?

A slice of AJAX here and a dash of AJAX there, only when appropriate, can bring fun and richness into an application without breaking the browser tools your users need. A whopping portion of AJAX dependency can not only richen your user's experience, but also crush it. How far you want to take it is your decision, but I'll be avoiding the double edged sword.

No comments: