[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] REST vs. HTTP in the real world



John Elliot wrote:
> On Tue, 29 May 2007, James Andrewartha wrote:
>> John Elliot wrote:
>>> Please explain to me what you expect two invocations of this
>>> operation to render as their "sole effect":
>>>
>>>  DELETE /my-doc?section=2.1
>>>
>>> Note: that URI is designed as it is so as to help you avoid
>>> confusing the resource it represents with a 'file'.
>> OK, I see your point about resources. So the answer is I'd expect a
>> 405 error response from each invocation.
> 
> You concede then that POST is the way to go for web-applications/APIs 
> where 'resources' don't map cleanly to 'files'?

No, since I'd expect /my-doc?section=2.1 to contain links to one or more
URIs that identify the component(s) of section 2.1 that can then have the
PUT or DELETE or GET operation invoked.

> Will you also grant that in most web-applications such conceptual 
> mappings are non-existent and/or impractical?

No. For a whole lot of the web-apps that have SQL backends the conceptual
mapping is quite easy.

> I think that that having effect-bearing operations go 'via 
> business-logic' provided by a service is the way to go, and that POST 
> is the correct verb to use for that. What do you think of that? (That's 
> the subject here, it's not a "What is REST?" discussion.)

I think it results in a web that has poor cacheability, higher cognitive
load and less flexibility.

James Andrewartha

-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.