This post originated from an RSS feed registered with .NET Buzz
by Scott Hanselman.
Original Post: Mixing Metaphors and Making Things Too Complex (REST and SOAP)
Feed Title: Scott Hanselman's ComputerZen.com
Feed URL: http://radio-weblogs.com/0106747/rss.xml
Feed Description: Scott Hanselman's ComputerZen.com is a .NET/WebServices/XML Weblog. I offer details of obscurities (internals of ASP.NET, WebServices, XML, etc) and best practices from real world scenarios.
Folks keep trying to push metaphors (or similes, like, depending on how you say it)
a smidge too far. Steve
Maine had some words for Mark
Baker. That said:
I write a letter, a document even, and it has no address on it and doesn't even say
"Dear Patrick."
I tell the Postman, remembering that I'm only able to tell him two things, GET and
POST, to take this letter to my friend Patrick.
POST /patrick.aspx HTTP/1.0
If the Postman puts the document (not a message, considering that he's the only one
who knows where it's going) down on the seat, in order to Store and Foward this message
- is it a letter? No, it's a document with no destination.
REST doesn't cover this. The address is out of band. It's not on the "envelope"
as there IS NO ENVELOPE. Trying to say that the HTTP Headers are
a Poor Man's Envelope succeed only in describing a very poor man.
SOAP
I write a letter, a document even, and it has no address on it and doesn't even say
"Dear Patrick."
I put it in an envelope (also, a folded piece of paper, except this one has glue on
it in certain places and a licky part) and put ATTN: Patrick (WS-Addressing) on the
outside with some wax seals (WS-Security) and a Notary Public Stamp (WS-Trust).
If the Postman puts the document on his seat, the document (now a bona fide message)
could be delivered by a substitute Postman.
Thus, SOAP adds, gasp, value by simply formalizing addressing, containment, and with
WS*.*, security and trust.
And, it's transport independent. The Postman is free to use a Mule or a Segway.
How anyone can argue about this is beyond Patrick and I.
REST is interesting, and when simplicity is called for, knock yourself out.
But seriously, I can see why some may call them RESTafarians because more often than
not "Hay now, Mista Postman, tak dis letta to mwa bwoy Patrix. Eim dwon undastan
SOAP." doesn't cut it if you really want your letter to arrive.