« SE Radio Interview | Main | Code-first services »

Coupling isn't so black and white

Dan Pritchett takes issue with Pete Lacey's characterization in his InfoQ interview of web services being too tightly coupled. Dan's issue seems to be that REST is more tightly coupled than its proponents would have you believe. He writes:

The simple facts though is that REST doesn't make this any better. Resources have formats (schemas if XML). They are located by URI's which is a contract for where they can be found. Change the resource format in an incompatible way and clients break. Move the resource to a new location and the clients break. Contracts are contracts, break them and you break the software.

The "move the resource" issue is bogus, given that you can just redirect clients (e.g., HTTP 301). But more generally, coupling isn't so black-and-white. It's not an on-or-off switch. Rather, coupling is measured in degrees. REST advocates claim that it can allow for more loosely coupled systems than SOA or WS-*. And I agree with them.

Take for example REST's uniform interface constraint. If you consider the client/service interaction equation to consist of factors for interface coupling, data coupling, and semantic coupling, REST's uniform interface constraint effectively removes the entire interface coupling factor. SOA and WS-*, OTOH, actually promote interface coupling as a strength.

As I finish writing this, I see that Pete has already responded to Dan, and he's right on target, as usual.

Comments (2)

"REST's uniform interface constraint effectively removes the entire interface coupling factor"

I agree with that but am currently of the opinion that this has a "wallpaper bubble side-effect" where we remove the coupling in one place and move it someplace else but just don't talk about it anymore (pretending it's not there) and claim it's an advantage.

Hi Dan, I've wondered the same thing, but I don't think it's actually the case. To where does the coupling move? I don't believe it moves to the data.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on December 19, 2006 6:50 PM.

The previous post in this blog was SE Radio Interview.

The next post in this blog is Code-first services.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.31