Sunday, August 23, 2009

'She was a cute little ruin that he pulled out of the rubble. Now they are both living in a soft soap bubble' - Declan McManus, 2002

Another REST versus SOAP post to chew on. I usually steer clear of this well-worn subject like the plague, but for whatever reason started skimming this post and it's kind of useful. I know, I know - REST isn't a protocol, it's an architecture style that's thrown about loosely for a lot of things and you can (in a narrow sense, with enough effort) "do" REST using SOAP (2.0).

Maybe it's the pragmatist in me but I think it comes down to what the consumer needs are. You remember them, right? What do they look like? Do they need the WSDL trappings or any of the WS-* protocols that require SOAP as their base? Are their message exchange patterns consistent with a RESTful style or a more message or RPC based approach?

The answer can be neither - some of the best Web Services out there today are not either REST or SOAP. Many of Google and Yahoo's Web Services are "REST-like" or "REST with extensions". Some of Amazon's Web Services are SOAP, some are quasi RESTful, some are Query style and some RPC-ish.

It's all about what the current consumers want. Make the implementations such that it'll be easy to add additional flavors if you come across new consumers who need something else, but do it then, not now. They're not your consumers yet.

You might be gun-shy because you've made those 'narrow' decisions in the past and then it took so much effort to add additional capabilities like this after the fact. That's not a problem of the interfaces you expose, though - that's a probably with the implementation. Doc, it hurts when I do this. Then don't do that.

You do remember your consumers, right Brett? Oh, I'm sorry - did I break your concentration?

Perhaps if all of the great technology debates were framed within the bounds of Pulp Fiction, the world would be a less complex (if more violent and foul mouthed) place.

Actually, it could never be more violent than it is already (and this would be over-the-top movie stylized mayhem).

And if it's more foul mouthed, what the fuck is wrong with that?

No comments:

Post a Comment