{"id":393,"date":"2008-04-09T22:27:22","date_gmt":"2008-04-10T03:27:22","guid":{"rendered":"http:\/\/www.biske.com\/blog\/?p=393"},"modified":"2008-04-09T22:27:35","modified_gmt":"2008-04-10T03:27:35","slug":"aligning-rest-with-services","status":"publish","type":"post","link":"http:\/\/www.biske.com\/blog\/?p=393","title":{"rendered":"Aligning REST with Services"},"content":{"rendered":"<p>I&#8217;ve been meaning to call out a blog from <a href=\"http:\/\/apsblog.burtongroup.com\/2008\/03\/rest-is-about-r.html\">Anne Thomas Manes<\/a> posted back in March, along with <a href=\"http:\/\/tech.groups.yahoo.com\/group\/service-orientated-architecture\/message\/10014\">a message in the Yahoo SOA group<\/a>, as they were finally something that, in my opinion, added some useful information to the ever present REST versus SOAP\/WSDL debate.  Normally, I stay out of this religious war when it kicks up in the blogs or the <a href=\"http:\/\/tech.groups.yahoo.com\/group\/service-orientated-architecture\/\">Yahoo SOA group<\/a>, but that&#8217;s not to say that I don&#8217;t care about it.  The fact is, I&#8217;m a practicing enterprise architecture in a Fortune 500 company, so I need to be providing guidance when a team comes to me asking about REST versus SOAP\/WSDL.<\/p>\n<p>In most of the conversations about REST and SOAP\/WSDL, it&#8217;s usually a comparison of a single SOAP endpoint (a single URI) to a single REST endpoint (again, a single URI).  Invariably, the conversation always wind up being about the uniform interface (GET\/PUT\/POST\/DELETE when using HTTP) versus the non-uniform interface (whatever operations are defined in WSDL) tunneled through the transport (POST when using HTTP) in SOAP.  I&#8217;ve always felt that this was a bit of an apples and oranges debate because the REST endpoint is exposing a resource, and the SOAP endpoint was exposing a service.  When thinking of services in a conceptual, technology independent manner, the mapping to a resource just didn&#8217;t seem as straightforward.<\/p>\n<p>The comment that Anne made that helped put things in the right perspective was this:<\/p>\n<blockquote><p>\nService consumers interact with the service through the set of resources it exposes.  In other worlds, the resource model <em>is<\/em> the interface to the service.  Each resource exposes a uniform interface (e.g., GET, PUT, POST, and DELETE), but an individual resource is not the complete service.\n<\/p><\/blockquote>\n<p>This made it very clear.  If you&#8217;re trying to go from a conceptual service model to a design based on REST, an individual service does not equate to a single REST endpoint.  Rather, it equates to a collection of REST endpoints that together comprise the resource model associated with that service.  In my opinion, the lack of an understanding around this concept is probably also why most of the &#8220;REST&#8221; services out there really aren&#8217;t REST, but rather are XML over HTTP without the WSDL and SOAP envelope.  The people involved are still trying to do a single endpoint comparison and not thinking about the resource model as a whole.<\/p>\n<p>Now, I&#8217;ll admit that this insight still doesn&#8217;t solve the uniform versus non-uniform debate, but I do think that it brings us to the point where a valid comparison of approaches for a particular problem could be taken on within an organization.  Thanks Anne!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been meaning to call out a blog from Anne Thomas Manes posted back in March, along with a message in the Yahoo SOA group, as they were finally something that, in my opinion, added some useful information to the ever present REST versus SOAP\/WSDL debate. Normally, I stay out of this religious war when [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,31,1],"tags":[],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-it","category-rest","category-soa"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=393"}],"version-history":[{"count":0,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/393\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}