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

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



On Wed, 30 May 2007, Nathan de Vries wrote:
> On Wed, 2007-05-30 at 17:34 +1000, John Elliot wrote:
> > This is how you implement a RESTful shopping basket (excuse the
> > HTML)...
>
> If you listen carefully, you can almost hear baby Jesus crying.

I can't quite get over how childish that is. I'd expect more from you.

Is it that you don't understand that URI is the engine of application 
state in a RESTful application?

I'm not saying that what I demonstrated is *the way* to implement a 
shopping basket, simply that it's the *RESTful* way to implement a 
shopping basket.

In REST the URI is the engine of application state, and the state of the 
user agent is the result of a succession of (ideally) GET operations. 
So, first you get the product list. Then you get the product list with 
three apples in it. Then you get the product list with three apples and 
four oranges. Every time you get the product list there will be a form 
that allows you to GET the checkout form. Because all of these 
operations are side-effect free, it doesn't matter which server 
processes the successive requests. There is no state maintained on the 
server between requests; requests do not affect server state, the URI 
is the engine of application state, and views are cacheable.

That's what REST is primarily about. So to mock me is to betray your 
ignorance.







-
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.