Re: Resource definition

On Wed, Feb 19, 2003 at 08:55:34AM -0800, Francis McCabe wrote:
> First of all, there are any number of actions which cannot be 
> represented by an update in the state; especially in any state that is 
> accessible to the requestor!

Sure.  PUT would be the wrong method to use for those actions, because
it is defined such that the requestor provides a complete representation
of the desired state of the resource.  POST, on the other hand, is made
for actions whose semantics are such that the resulting state of the
resource is *not* known to the requestor.  So in this theoretical sense,
you have a spanning tree of mutators, as it can be said that "There are
two kinds of mutators in the world, ...". 8-)

In practice it's not quite that simple.  For example, WebDAV has a COPY
method because it's impractical to do a GET and PUT, not because the
semantics don't match, nor even because of atomicity, but just because
it's inefficient to retrieve a document with GET over a network, only to
send it right back.

> Secondly, simply telling the resource that the light is on is not 
> equivalent to actually switching the switch!

It's equivalent in that the end result is the same.  I'm not sure what
differences you had in mind, but I'd be interested in hearing about them
(though perhaps off-line, to www-archive, or www-talk, etc..)

MB
-- 
Mark Baker.   Ottawa, Ontario, CANADA.        http://www.markbaker.ca
Web architecture consulting, technical reports, evaluation & analysis

Received on Wednesday, 19 February 2003 13:18:49 UTC