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