|
|
||
Ryan Heaton's Blog
«Enunciate 1.4: Your JAX-WS endpoint published as a GWT-RPC endpoint |
Main
| Enunciate 1.5 Released »
Why ROI vs. SOI (read "REST vs. SOAP") Still MattersPosted by stoicflame on October 09, 2007 at 04:31 PM | Comments (2)The honeymoon with RESTful Web services is over. Now that we've had some time to get over the infatuation, let's take a fresh look at the principles of sound Web service API design. Despite how rocky our relationship with SOAP has been, it's time to confront our prejudices and accept both technologies for their virtues and vices. In fact, I propose we give this discussion a new identity in order to help us put the painful memories, bitter tears, and long, sleepless nights behind us. Because it's not really about REST vs. SOAP anymore, is it? A well-designed Web service API is so much more important than the technology we use to implement it. So after we get past the name-calling and mud slinging, what we're left with is a set of fundamental architectural principles for Web service API design. On the REST side of the playing field we have engineers who have a set of well-defined resources that they want to make available by defining a constrained set of basic operations that can be applied. On the other side, we have engineers whose operations are much more complex, maybe contextual, and perhaps interdependent. These engineers may or may not have a well-defined set of resources to which these operations apply. Rather than making a set of resources available, these engineers have a set of services they want to make available. So on one end of the spectrum we have the need to design a Resource-Oriented Interface (ROI). On the other end, we have the need to design a Service-Oriented Interface (SOI). Determining what kind of an API is to be published should be the first step in designing a good Web service API. And, trust me, it's not always easy to determine where your API fits. You may, for example, have a well-defined set of Gismo objects to which you can limit your operations to be create, read, update, and delete. But what if you want to provide a search operation for Gismos? In this case, the boundaries of the resource and the operation are less clear. In any case, you will be able to make a much better choice of a development technology if you can first define whether your API is more Resource-Oriented or Service-Oriented. (By the way, it'll probably fit somewhere in between.) Choosing the development technology first is letting the tail wag the dog. Still unconvinced? May I suggest that you subscribe to one or more of the common misconceptions about the current state of Web service development? Let's debunk those right now, shall we?
So what do you think? I say let's adopt a rational, reasonable approach to Web service API design and stop letting the tail wag the dog. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first)
| ||
|
|