August 2006

In Contention

Screw

Adrian, my good friend and colleague rails:

If I have to look at the SOAP/XML on the wire, it means that Web-Services integration is failing for me

Reasonably he want’s a toolkit to abstract away the Matrix Rain of pointy brackets, whereas I want to expose his services to abstract away toolkits. In a nutshell, that’s our problem.

Technorati Tags: , , ,

Comments (1)

Permalink

How many pounds am I pushing?

After being flooded by comment spam and then breaking comments by blocking half the dictionary, I took the plunge and upgraded to Wordpress. A world of possibilities has now opened. Let me know if I’ve broken something.

Comments (0)

Permalink

Send three and fourpence, we’re going to a dance

Mark bookmarks So which CRUD Operation is HTTP POST?
with the comment:

CRUD has no equivalent to POST. It’s a different abstraction. Let’s stop trying to shoe-horn the Web into the shape of a database please.

Which was my point, exactly :-( Note to self: be clearer when decocting the micturition.

Technorati Tags: , ,

Comments (4)

Permalink

So which CRUD Operation is HTTP POST?

Spaceglenda37

As Stefan says, many people still like to think of REST in terms of CRUD. So here’s my 2p worth:

  • GET safely retrieves copy of a thing identified by the URI. Let’s call that READ.
  • PUT - sends a complete copy of the thing. So that could be CREATE, or UPDATE, it’s the response of 201 Created or 200 OK which tells you what actually happened.
  • DELETE is well, um, DELETE.

All the above work on a complete copy of the thing identified by a URI. PUT sends a new copy of the thing likely to be returned by the next ‘GET’ meaning caching could potentially be made to work both ways. Well, if you’re very optimistic or offline. Using HEAD and ETag is going to help here.

Then there are to mostly forgotten OPTIONS which has some potential, TRACE, CONNECT and of course you can foist your own made up HTTP verbs onto the world if you’re big, evil or someone like Microsoft (not mutually exclusive :).

So what about POST? Isn’t that just UPDATE? Well POST sends “a new subordinate”, i.e. not necessarily the whole thing. The difference is the message sent can be anything, and the agent can do anything with that message, including READ, CREATE, DELETE. Unfortunately a happy POST mostly results in 200 OK which is HTTP speak for Stuff Happens.

This means that POST requests aren’t something on the web (a rather meaningless term), but a hack to enable HTML Forms to buy a book or send a text message or any one of the fantastic things which make the Web useful. It also enables HTTP to be used to tunnel arbitrary SOAP, POX, JSON, whatever, messages, which often don’t map onto anything CRUD like at all, like ChangeLightBulb or FireNuclearMissiles.

An idea that’s been around forever is mapping the Unix architecture of Everything is a File onto the Web’s Everything is a URI making GET a ‘<‘, PUT a ‘>‘ and POST a pipe ‘|‘. Maybe Plan 9 has finally come of age.

But, wait, there’s a big buzzing fly in the room: content negotiation. The power of HTTP means the same thing identified by a URI to be exchanged using different representations. That’s useful when you’d like today’s weather as text, sound or video, but does rather mess up such simple analogies.

Technorati Tags: , ,

Comments (1)

Permalink

English Lesson

Just for the record, the official English plural of LEGO® is “Lego”. You have to be American or stupid (not mutually exclusive) to call them “Legos”. That is all.

Comments (0)

Permalink

Wrongly Pegged

Stefan has me down as a WS-* supporter. That’s only right if by “support” you mean bug fixing. Er. No. Put me down as someone who is a big, fat, bad, bold fan of the Web.

Technorati Tags: ,

Comments (1)

Permalink