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

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



On Thu, 2007-08-02 at 20:04 +0100, Roland Turner wrote:

> - The URIs-for-transactions thing is bent. Two disjoint meanings of the
> term are in use (shopping cart vs. group of CRUDs) which limits the
> discussion's potential for progress. The former is not a good candidate
> for CRUD (stock reservation, >1000 character URIs, etc.), the latter is
> better handled with a session (e.g. via cookies) and explicit "start
> transaction"/"commit"/"rollback" operations, whether via POST or
> otherwise. (Where "otherwise" does _not_ include DELETEing a transaction
> to roll it back. Yuck.)

I meant to add that this is essentially a variant of "if you only have a
hammer, then everything looks like a nail" mentality. People will use
stuff badly, no matter how much of it you strip out (and sometimes
_because_ you strip stuff out). Two XML examples:

- Some people will insist on modelling everything as an element, rather
than allowing some things that are "not important enough" to simply be
attributes.

- Jabber treats the _entire_ session as a single XML document, rather
than one document per operation. I imagine that the Haskell folks love
this, and it plays pretty well with SAX (but not DOM) parsers, but,
yuck.

Using REST operations to manage transactions is ugly, but forcing
RESTafarians into POST won't help; they'll just POST an operation which
creates a persistent transaction object...

- Raz


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