RESTful and "graceful" degrade if javascript is disabled

I’m trying to resolve a sort of personal conflict.

On the one hand, I want to use the new nifty javascript things. In the
case of the application I’m writing, it would make the user interface
usable and I can’t figure out how to do a usable user interface without
javascript.

But on the other hand, I have heard loud and clear that a “good” site
should degrade gracefully if javascript is disabled. But something kept
buzzing around in my head about something that does not really happen,
it actually invokes a small piece of javascript… yada yada yada… I
couldn’t remember what it was.

I figured it out. For one, the “delete” links for a RESTful application
invoke javascript ‘onclick’ to submit the request and add in the
“:method => delete”. For curiosity, I disabled javascript and poked the
link to see how did it work if javascript was disabled. Answer: it does
nothing – really. It sends a request for the page that you are
currently looking at.

So… is this considered a graceful degradation? There is no way to
delete objects in a normlal Rails RESTful implementation. It doesn’t
even say “Loser!”. It just redraws the screen.

pedz

On 8/12/07, Perry S. [email protected] wrote:

buzzing around in my head about something that does not really happen,
So… is this considered a graceful degradation? There is no way to
delete objects in a normlal Rails RESTful implementation. It doesn’t
even say “Loser!”. It just redraws the screen.

Nope. Just like with ‘unrestful’ apps, you need to specify a valid
fallback page. If there’s no javascript, the onclick is ignored, and
whatever is in the href attribute is followed. This could be pointed
at some sort of delete confirmation page if you want.

–
Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com