WS-BabyWithTheBathWater: Beyond WS and REST
0Following up on Don Box, Tim Bray captures the essence of REST nicely in his Styles: Beyond WS and REST post:
- You have a lot of things in the system, identified by URIs.
- The protocol (probably HTTP) only knows one MEP: single-request, single-response, with the request directed at a URI.
- An important subset of the requests, what HTTP calls GET, are read-only, safe, idempotent.
- You expect to ship a lot of URIs around in the bodies of requests and responses, and use them in operations that feel like link following.
I also agree with his characterization of HTTP verbs as a red herring:
The notion that you can usefully classify systems according to whether or not they use HTTP PUT and DELETE is silly. … There are two kinds of operations against a resource in the system: those that can change its state, and those that can’t.
This is consistent with my experience; PUT and DELETE are a bit of a pain to implement and their usefulness is suspect.
Btw, “Web style”, Tim’s proposed name for REST-like services, is terrible. Even Lo-REST is better.
However, I think blindfolding and shooting all of WS-* as a style goes too far. There are some useful, if horribly implemented, concepts in there. Namely:
* Standard description of the interface. WSDL is so ugly even its mother has trouble loving it, but the idea of machine and human readable interface descriptions is a powerful one. We could have a simple one for “Web style”. We used one back in 2000 that consisted of sample input and output XML documents. Very useful, you could immediately see the expected input and output and even use the sample as a template.
* Directory of services. I would personally stand in line to shoot UDDI, but some sort of directory is a decent idea. Not for runtime semantic magic hand-waving, but for development time discovery of available services.
* Hmm… I thought there were more. The rest, now that I think about it, deserve a blindfolding. There must be more decent concepts in there. Anyone?
Manage your expenses via Email, SMS, iPhone, Twitter, Voice (Call and say your expense), IM (Yahoo, AIM, MSN), or Web.