2009年9月16日星期三

[fw-mvc] Zend_Rest_Route recommendations; different views on same resource

Zend_Rest_Route has a very humble place in the documentation up to now.
I was wondering what you've had in mind for the common case that you have a
show and an edit action on a certain resource:

Quoting a ruby on rails rest cheatsheet, this is how they do/did?
differentiate between editing and showing a resource

VERB: GET
PATH: teams/1/players/3
action: show

VERB: GET
PATH: teams/1/players/3;edit
action: edit


So what they basically do is saying that player 3 and 3;edit are different
resources; they are different members of the same team.

I can understand this reasoning, but I tend to think that we want to GET a
different view on the same resource. This would mean that view is a concept
in REST isolated from resource. I've read some articles and even parts of
the original doctor's thesis, but I don't know.

Maybe the designers from this component are real REST experts that can
enlighten my humble mind? I don't have experience yet with REST, but I want
to do it right, because there are many things called REST which aren't.

For other people,
http://www.atomenabled.org/developers/protocol/atom-protocol-spec.php#operation
the atom-protocol is a good REST-example imho. It only doesn't offer me a
practical answer for my question.

// To be honest, I think that Zend_Rest_Server is a mistake with respect to
its name. It has its use, but it's not REST.
--
View this message in context: http://www.nabble.com/Zend_Rest_Route-recommendations--different-views-on-same-resource-tp25482011p25482011.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: