O'Reilly logo

Ajax on Rails by Scott Raymond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Usability on the Web

So far we’ve looked at the general principles and aspects of usability, as well the specific constraints and issues with the medium of the Web. Now it’s time to synthesize that knowledge into some practical patterns for designing usable Ajax applications with Rails.

Know When to Use Ajax—and When Not To

Years ago, the choice of whether to Ajaxify an application was largely a question of resources: do you have the time and money required to wrestle with different browser implementations and quirks? Ajax has never been rocket science, but getting it right often required a significant amount of work. Rails changes that equation by making Ajax development just as easy as traditional development. Does that mean Ajax is the right tool for every job? Certainly not. Rails makes Ajax easy not so that you can always use it, but so that you can decide whether it’s appropriate on the basis of the problem at hand. Upon discovering how to do Ajax—and how easy Rails makes it—it’s tempting to abuse it. Let’s look at some examples.

Don’t break the back button

Perhaps the most fundamental rule of usable Ajax development is to not break the “back” button. Remember the role of expectations in usability: if users’ expectations aren’t met, the design isn’t working. On the Web, practically nothing is more expected than the back button. It’s an essential component of the Web user experience—and undermining it will lead to very frustrated users.

When we talk about the back button, it’s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required