Graceful degradation
From an article on Rails (really Rails-specific, and thus of minimal interest to me) comes this snippet:I work around that with ease. I write actions that return a partial if called from XHR, and return the same partial with layout if called to render a full page. That way I can use the same action for in-place editing and to open separate windows and tabs. (But be careful when caching, see above).
In the onclick event handler, I look for modifier keys. If the user pressed a modifier key, I let the browser handle the linking. If the user didn't press a modifier key, I let AJAX do it's in-place magic.
It's the traditional technique for creating ‘degraded’ UIs, but the end result is a more powerful and useful UI.
Posted at 2007-01-10 09:43:06 by Richard • Link to Graceful degradati…
Comments, trackbacks.
