Re: Self-descriptive messages

Jan Algermissen <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
Hi Roy,

thanks a lot for stepping in!

On Aug 28, 2012, at 12:07 AM, Roy T. Fielding wrote:

> 
> 
> I suggest folks worry less about that constraint (of visibility during
> a POST, which we already know isn't visible by nature) and more about
> what properties are lost by representation-by-reference. 

FWIW, the cart/order scenario discussed is just a special case of the more
general idea of 'action resources' (body-less POST to an action-triggering
URI), e.g.

POST /cart?order
Content-Length: 0

Does your argumentation apply equally to the question of whether such
'action resources' are suitable design?

Or is there a fundamental difference between the cart URI being part of
the body and the URI being the 'prefix' of the order-processor-resource?

After all, both could be discovered from hypermedia equally well.

Until now, I have used the self-descriptiveness constraint to argue against
both designs.

Since what you said makes sense to me, I am now in search for a new line of
argumentation against POST /foo?triggerSomeStuffWithFoo

A starting point for me would be that one design only uses a single ordering
resource (/order-processor) while the other yields an unlimited number
(/cart/{id};order)


Can you give a hint?



Jan




> Most of the
> value cases for REST apply to repeatable responses, not an application
> that can't be reused, can't be transformed, and can't be shared.
> I do not believe in trying to apply all of REST's constraints unless
> there is a reason for doing so (aside from buzzword compatibility).
> 
> My guess is that coupling would be more of a hazard than loss of
> visibility, but maybe even that wouldn't matter if the application is
> entirely driven via hypertext. It is really hard to get excited
> about the finer points of API design when the chosen method already
> says "do whatever you like with this".
> 
> ....Roy
> 
> 



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rest-discuss/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/rest-discuss/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.