Free as in Time

About Me | About this Blog

Ajax: Keeping the User Informed

June 20th

Bruce Williams’ blog has many nuggets of awesome. Example: Rails Views: Avoiding AJAX Faux Pas.

  1. You will always indicate when a remote action is occuring. Show a progress indicator; spinners are common these days, but use whatever makes sense. And don’t be fooled into thinking the action occurs so fast no indicator is needed—it may seem nearly instantaneous on your development server (with just you accessing it), but who knows what the future will hold?
  2. You will always stop the progress indicator when the action is complete. An ever-spinning progress indicator is pretty, but probably pretty confusing, too.
  3. If the action results in success, you will always show the result. Reload a div, insert an element, maybe do some fancy scriptaculous “Hey, look at me” effects. The point here is to do something. The user did something, and they want something in return.
  4. If the action results in failure, you will always notify the user. The only thing more frustrating than not knowing that something is going on is not knowing it failed—or how to fix it.

I really ought to read him more often.

Tags: No Comments

Leave A Comment

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.