On Jul 31, 2006, at 8:33 PM, David Heinemeier Hansson wrote:
When do you feel that you need postbacks? In some sense, I'm seeing
the use of a richer verb set as a way of rescuing us from postbacks.
Do you have a few examples in a REST-powered app where they feel like
a good fit? I'm starting to think that explicitly ignoring them with
map.resources is a feature.
Eh, postbacks aren't a big deal. The amount of code is similar either way. I just thought it was neat to be able to continue to support that functionality. If moving away from that style is an explicit goal of restful routes, then I'm cool with it. And since (as Rick reminds us) we have the :any method option, one can still do postbacks if it's really needed.
Postbacks aside, I still think inverting the optional actions hashes (key by method instead of action) is still a better way to go. It's less to type, less to transform, and I tend to think of the actions grouped by http method anyway (at least when doing restful routes). It's not a huge difference so if I'm a lone voice on this I'll shut up, but I did want to at least put it forth as an option.
--
Josh Susser