REST and POST and side effects

Russell Turpin deafbox@hotmail.com
Thu, 23 Aug 2001 19:51:07 +0000


Clay Shirky writes:
>.. however, that this axiom is assymetric in practice. The actual web 
>development community has many members who work with the "Use POST unless 
>you specifically want
>it bookmarked" axiom, which leaves many places where POST is used without 
>side effects, or "Some A are Not-B".

In fact, GET has side effects also. Even the "good" GETs
that the RESTful folks approve. Consider any site that
lets you see recent visits by registered users. Or for that
matter, any site that has Web-enabled administration of its
web server.

I guess the RESTful folks can argue that these side effects
don't change the resource itself, but just the web server.
However, the effects can be made part of the resource itself,
for example, if visiting the page that shows recent visitors
makes *you* a recent visitor. The debate might then descend
into the boundaries of a "resource," which itself is poorly
defined.

Shirky is right. HTTP is like C. It is very useful, just
right for the time, has been extended far beyond its creators
original intent, and has very ugly semantics. Now the creators
and the RESTful folks want to go back and treat it as if it
were Prolog, or some other language with tractable semantics.
I've never seen that kind of genie stuffed back in the
bottle. And I remain very leary of a document of axioms,
purporting to explain a technology's semantics, that resorts
to describing how users *should* behave, rather than how the
technology behaves. That way lies only politics and never-
ending debate.

Russell



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp