<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Notmessenger&#039;s messages</title>
	<atom:link href="http://www.notmessenger.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.notmessenger.com</link>
	<description>What is difficult takes time, what is impossible takes a little longer</description>
	<lastBuildDate>Wed, 22 Jun 2011 06:11:32 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on I have a blog – so now what? by Berny</title>
		<link>http://www.notmessenger.com/php/i-have-a-blog-%e2%80%93-so-now-what/comment-page-1/#comment-2934</link>
		<dc:creator>Berny</dc:creator>
		<pubDate>Wed, 22 Jun 2011 06:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=9#comment-2934</guid>
		<description>Thanks for those words of inspiration, I to am sitting staring at the keyboard - amazing how disfunctional your brain can become when faced with a new challange.</description>
		<content:encoded><![CDATA[<p>Thanks for those words of inspiration, I to am sitting staring at the keyboard &#8211; amazing how disfunctional your brain can become when faced with a new challange.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Dino</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-2698</link>
		<dc:creator>Dino</dc:creator>
		<pubDate>Wed, 08 Jun 2011 21:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-2698</guid>
		<description>Have been researching the versioning issue but the one sentence that your article resonates with me is &quot;As the consumptive programmer, I very often run across a situation where I mumble under my breath at the decisions made by the developing programmer in how they arrived at the solution I am attempting to use&quot;. This articles reflects the view of this author based on this principle (which I happen to agree with). 

A lot of people say it is wrong for adding the version to the url. Is ebay wrong, is amazon wrong? I suppose so but in the end you are the one maintaining it.</description>
		<content:encoded><![CDATA[<p>Have been researching the versioning issue but the one sentence that your article resonates with me is &#8220;As the consumptive programmer, I very often run across a situation where I mumble under my breath at the decisions made by the developing programmer in how they arrived at the solution I am attempting to use&#8221;. This articles reflects the view of this author based on this principle (which I happen to agree with). </p>
<p>A lot of people say it is wrong for adding the version to the url. Is ebay wrong, is amazon wrong? I suppose so but in the end you are the one maintaining it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by JonWillard</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1451</link>
		<dc:creator>JonWillard</dc:creator>
		<pubDate>Thu, 07 Apr 2011 13:58:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1451</guid>
		<description>This discussion is very interesting.   I have a restful applicaiton that uses xsd defined objects and JAXB beans for input/output.  What is the best way to deal with xml validation, and changing schema versions as data to changing restulf apis?

For instance the schema will define say Customer as having an address and a phone number and the restul api will use the generated bean as input/output for PUT/GET.  Now imagine if the structure of the Customer xsd/bean needs to change significantly and I want to support legacy calls and new calls.  Ideally I would like one implementation on the server that can recognize the version and produce the correct xml.  Maybe that goal is impractical.  Maybe I need parallel implementations for the different versions, at least for the translations of my data model into the JAXB beans data model.

If I have a separate mime type for each schema will schema validation be easy to do?  Will I still be able to consume/produce JSON or XML like I do now?  If I use versioned uris then each url will be directed to the correct BEAN/Schema processing which can then call my more generic data modeling system.

Anyway I appreciate your thoughts on this.

Jon</description>
		<content:encoded><![CDATA[<p>This discussion is very interesting.   I have a restful applicaiton that uses xsd defined objects and JAXB beans for input/output.  What is the best way to deal with xml validation, and changing schema versions as data to changing restulf apis?</p>
<p>For instance the schema will define say Customer as having an address and a phone number and the restul api will use the generated bean as input/output for PUT/GET.  Now imagine if the structure of the Customer xsd/bean needs to change significantly and I want to support legacy calls and new calls.  Ideally I would like one implementation on the server that can recognize the version and produce the correct xml.  Maybe that goal is impractical.  Maybe I need parallel implementations for the different versions, at least for the translations of my data model into the JAXB beans data model.</p>
<p>If I have a separate mime type for each schema will schema validation be easy to do?  Will I still be able to consume/produce JSON or XML like I do now?  If I use versioned uris then each url will be directed to the correct BEAN/Schema processing which can then call my more generic data modeling system.</p>
<p>Anyway I appreciate your thoughts on this.</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Jeremy Brown</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1186</link>
		<dc:creator>Jeremy Brown</dc:creator>
		<pubDate>Thu, 24 Mar 2011 21:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1186</guid>
		<description>I am currently pondering Darrel Miller&#039;s comment that was posted after this one to which I replied, as perhaps that is part of the answer to my above-asked question.</description>
		<content:encoded><![CDATA[<p>I am currently pondering Darrel Miller&#8217;s comment that was posted after this one to which I replied, as perhaps that is part of the answer to my above-asked question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Jeremy Brown</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1185</link>
		<dc:creator>Jeremy Brown</dc:creator>
		<pubDate>Thu, 24 Mar 2011 21:53:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1185</guid>
		<description>I have absolutely struggled with reconciling that 1) REST represents resources and their representations and with 2) the business application behind it all.  From the REST standpoint I can very easily understand what &#039;/customer/73/order/12&#039; represents.  Sending a DELETE request to this resource, for example, would cause order #12 for customer #73 to be canceled.  And again, from a REST perspective, that makes sense.

But what does that actually mean?  To me, this means that somewhere behind the API, in the application that the API provides access to, changes are going to be made to the data, following pre-determined business rules for doing so.  So let&#039;s say that today that means that the order is canceled and a refund check is cut to you and put in the mail.

Now let&#039;s say that we have changed our business processes and deleting an order no longer automatically causes a refund check to be cut.  You have to indicate what you want to do with your refund, either get it as a check or apply it as a credit to your account, by using a different URI.  The original &#039;/customer/73/order/12&#039; URI has not changed any as a resource, but it&#039;s behavior has absolutely changed.  For me, the consumption of a API is more than just the representation of resources - it&#039;s also a way to interact with a/the application.

How, then, are the representations of resources and business logic to be reconciled?  I ask this question without a concrete answer, because this seems to be a question with the area of REST API development to which there are many varied answers.  I am very much interested in yours, and others, though, as I cannot learn and improve without others ideas.  Thank you very much for your comment.</description>
		<content:encoded><![CDATA[<p>I have absolutely struggled with reconciling that 1) REST represents resources and their representations and with 2) the business application behind it all.  From the REST standpoint I can very easily understand what &#8216;/customer/73/order/12&#8242; represents.  Sending a DELETE request to this resource, for example, would cause order #12 for customer #73 to be canceled.  And again, from a REST perspective, that makes sense.</p>
<p>But what does that actually mean?  To me, this means that somewhere behind the API, in the application that the API provides access to, changes are going to be made to the data, following pre-determined business rules for doing so.  So let&#8217;s say that today that means that the order is canceled and a refund check is cut to you and put in the mail.</p>
<p>Now let&#8217;s say that we have changed our business processes and deleting an order no longer automatically causes a refund check to be cut.  You have to indicate what you want to do with your refund, either get it as a check or apply it as a credit to your account, by using a different URI.  The original &#8216;/customer/73/order/12&#8242; URI has not changed any as a resource, but it&#8217;s behavior has absolutely changed.  For me, the consumption of a API is more than just the representation of resources &#8211; it&#8217;s also a way to interact with a/the application.</p>
<p>How, then, are the representations of resources and business logic to be reconciled?  I ask this question without a concrete answer, because this seems to be a question with the area of REST API development to which there are many varied answers.  I am very much interested in yours, and others, though, as I cannot learn and improve without others ideas.  Thank you very much for your comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Jeremy Brown</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1184</link>
		<dc:creator>Jeremy Brown</dc:creator>
		<pubDate>Thu, 24 Mar 2011 21:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1184</guid>
		<description>I agree that putting version information in the URI will make life more difficult for clients, especially over time.  I would prefer to never have to use the URI for that, as I believe that the &#039;X-API-Version&#039; header should be all we ever need.  While the problem exists though that this header cannot be relied on 100%, we are stuck with the problem of “principles versus specification”.

An alternate approach would be to pass a parameter in the URI, such as ?version=2.3 which may or may not lessen the problems clients will experience over time.  Given the needs we had, and our anticipation that any &quot;major&quot; version changes would be because of changes in concepts, managing versions of the APIs as their own applications seemed a better way to go.  I suppose as with all things, time will only tell.

Thank you very much for your comments.  I have enjoyed the challenges to my thought processes they have introduced.</description>
		<content:encoded><![CDATA[<p>I agree that putting version information in the URI will make life more difficult for clients, especially over time.  I would prefer to never have to use the URI for that, as I believe that the &#8216;X-API-Version&#8217; header should be all we ever need.  While the problem exists though that this header cannot be relied on 100%, we are stuck with the problem of “principles versus specification”.</p>
<p>An alternate approach would be to pass a parameter in the URI, such as ?version=2.3 which may or may not lessen the problems clients will experience over time.  Given the needs we had, and our anticipation that any &#8220;major&#8221; version changes would be because of changes in concepts, managing versions of the APIs as their own applications seemed a better way to go.  I suppose as with all things, time will only tell.</p>
<p>Thank you very much for your comments.  I have enjoyed the challenges to my thought processes they have introduced.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Bryan Taylor</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1093</link>
		<dc:creator>Bryan Taylor</dc:creator>
		<pubDate>Mon, 21 Mar 2011 07:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1093</guid>
		<description>I think your approach to versioning is wrong because it violates fundamental axiom of the web, namely the 
 - opacity axiom http://www.w3.org/TR/webarch/#uri-opacity
 - no aliases axiom http://www.w3.org/TR/webarch/#uri-aliases
You tacitly acknowledge the second one when you say &quot;a URI expresses identity, and identity does not change when a new version is introduced&quot;. 

Putting versions in the URI violates opacity and forces clients to use out of band information (your URI construction schema), when all they should have to do is follow links. 

Your example of the customer changing from having one phone to two illustrates a data modeling problem: a resource cannot simultaneously have both 1 and 2 phone numbers. What does Joe&#039;s record look like in your database? If you start with the first form and make the change to allow multiples and Joe actually adds a second phone number, then it is incorrect for Joe&#039;s resource to provide the 1st representation. Joe no longer has a &quot;you have exactly one phone number&quot; representation. You could have modeled this differently and included an attribute for primary=&quot;true&quot; and keep Joe&#039;s representation. Then Joe has properties as a resource that aren&#039;t in the original representation, which is absolutely not noteworthy. At least we know it&#039;s the same Joe, because the URI is the same.

Asking &quot;what happens when the business logic behind the POSTing to a resource does something different than it did before?&quot; reveals the great beauty of REST, at least if you use HATEOAS correctly. The answer is nothing happens. The client is still presented with a representation uses hypermedia to define a menu of application state transitions. In the old media type representation the links must still be valid as well as in the new one. If you can&#039;t do both, you must pick one media type or the other. Putting a version number in the API doesn&#039;t solve anything in this regard and just confuses everything because intermediaries can&#039;t tell you are talking about the same resource. It also means that you will have links to resources that CANNOT have a valid reprentation. Yuck.

The worst thing about putting versions in the URI is that web you retire old versions you break everybody that stored those links. The web depends on permalinks, use them! How can you possibly expect not to have massive client breakage this way.

REST is all about media types. Read the last few bullets of Roy&#039;s fabulous post: http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven</description>
		<content:encoded><![CDATA[<p>I think your approach to versioning is wrong because it violates fundamental axiom of the web, namely the<br />
 &#8211; opacity axiom <a href="http://www.w3.org/TR/webarch/#uri-opacity" rel="nofollow">http://www.w3.org/TR/webarch/#uri-opacity</a><br />
 &#8211; no aliases axiom <a href="http://www.w3.org/TR/webarch/#uri-aliases" rel="nofollow">http://www.w3.org/TR/webarch/#uri-aliases</a><br />
You tacitly acknowledge the second one when you say &#8220;a URI expresses identity, and identity does not change when a new version is introduced&#8221;. </p>
<p>Putting versions in the URI violates opacity and forces clients to use out of band information (your URI construction schema), when all they should have to do is follow links. </p>
<p>Your example of the customer changing from having one phone to two illustrates a data modeling problem: a resource cannot simultaneously have both 1 and 2 phone numbers. What does Joe&#8217;s record look like in your database? If you start with the first form and make the change to allow multiples and Joe actually adds a second phone number, then it is incorrect for Joe&#8217;s resource to provide the 1st representation. Joe no longer has a &#8220;you have exactly one phone number&#8221; representation. You could have modeled this differently and included an attribute for primary=&#8221;true&#8221; and keep Joe&#8217;s representation. Then Joe has properties as a resource that aren&#8217;t in the original representation, which is absolutely not noteworthy. At least we know it&#8217;s the same Joe, because the URI is the same.</p>
<p>Asking &#8220;what happens when the business logic behind the POSTing to a resource does something different than it did before?&#8221; reveals the great beauty of REST, at least if you use HATEOAS correctly. The answer is nothing happens. The client is still presented with a representation uses hypermedia to define a menu of application state transitions. In the old media type representation the links must still be valid as well as in the new one. If you can&#8217;t do both, you must pick one media type or the other. Putting a version number in the API doesn&#8217;t solve anything in this regard and just confuses everything because intermediaries can&#8217;t tell you are talking about the same resource. It also means that you will have links to resources that CANNOT have a valid reprentation. Yuck.</p>
<p>The worst thing about putting versions in the URI is that web you retire old versions you break everybody that stored those links. The web depends on permalinks, use them! How can you possibly expect not to have massive client breakage this way.</p>
<p>REST is all about media types. Read the last few bullets of Roy&#8217;s fabulous post: <a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven" rel="nofollow">http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Olaf Bergner</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1079</link>
		<dc:creator>Olaf Bergner</dc:creator>
		<pubDate>Sun, 20 Mar 2011 13:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1079</guid>
		<description>OK, I now realize that I&#039;ve probably made a rather theoretical point here. I&#039;m not at all criticizing your approach here, quite on the contrary. It&#039;s all owing to my belief that the way we talk about some problem will unconsciously shape the solution we come up with.</description>
		<content:encoded><![CDATA[<p>OK, I now realize that I&#8217;ve probably made a rather theoretical point here. I&#8217;m not at all criticizing your approach here, quite on the contrary. It&#8217;s all owing to my belief that the way we talk about some problem will unconsciously shape the solution we come up with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Darrel Miller</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1078</link>
		<dc:creator>Darrel Miller</dc:creator>
		<pubDate>Sun, 20 Mar 2011 12:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1078</guid>
		<description>&quot;But what happens when the business logic behind the POSTing to a resource does something different than it did before? The structure of the request, and perhaps even the response, remain the same, but the results of your actions are completely different. This is a version change too.&quot;

If a change to the implementation logic behind an API could cause a client to break then your API is poorly defined.  The API is leaking implementation details.  
When a client makes a request it is merely communicating it&#039;s intent, the API should make no guarantees about how that will be achieved.

What can change is application workflow, but because REST apis are hypermedia driven, the workflow is explicit in the response representations and can be managed in the same way as the data.</description>
		<content:encoded><![CDATA[<p>&#8220;But what happens when the business logic behind the POSTing to a resource does something different than it did before? The structure of the request, and perhaps even the response, remain the same, but the results of your actions are completely different. This is a version change too.&#8221;</p>
<p>If a change to the implementation logic behind an API could cause a client to break then your API is poorly defined.  The API is leaking implementation details.<br />
When a client makes a request it is merely communicating it&#8217;s intent, the API should make no guarantees about how that will be achieved.</p>
<p>What can change is application workflow, but because REST apis are hypermedia driven, the workflow is explicit in the response representations and can be managed in the same way as the data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3 Tenets for Implementing a REST API by Olaf Bergner</title>
		<link>http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/comment-page-1/#comment-1074</link>
		<dc:creator>Olaf Bergner</dc:creator>
		<pubDate>Sun, 20 Mar 2011 04:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.notmessenger.com/?p=158#comment-1074</guid>
		<description>This is a good and mostly well thought out article on how to properly implement a RESTful service. I like that you have stayed away from the basics which we have been told about ad nauseam, 

That being said I take issues with your mentioning the term &quot;business logic&quot; when talking about REST.

The term &quot;business logic&quot; is meaningless in the context of a RESTful service. REST knows about resources and their various representations and nothing else. If or if not posting a resource to an endpoint triggers additional business logic is beyond what is expressible in a RESTful context.

Of course nothing keeps you from *emulating* a service e.g AccountService#addTelephoneNumberToExistingAccount  by posting the *resource* TelephoneNumberAddition - notice the transition from verb to noun here - to some endpoint. However, in the context of a ROA - Resource Orientied Architecture - as opposed to a SOA this does not constitute a service with some business logic attached to it. It simply means posting a resource.

Note that this reasoning leads to the same conclusion regarding how to properly implement versioning of a REST service (the term service in itself is a little unfortunate here, yet seems to be prevalent by now). Since REST does only know about resources and their representations, since representations are simply different views of the same resource, since resources are clearly central within a RESTful context, and finally since resources are uniquely defined by their URL, it seems natural to realize versioning in the way you described. 

But I would argue that a scenario where a &quot;service&quot;&#039;s version is incremented without changing the corresponding resource is beyond the realm of REST. From a RESTful point of view, absolutely nothing has changed, the underlying business logic - which has changed - is totally invisible to REST.

REST is not just a different way of publishing services. It&#039;s an entirely different view of what a service *is*.</description>
		<content:encoded><![CDATA[<p>This is a good and mostly well thought out article on how to properly implement a RESTful service. I like that you have stayed away from the basics which we have been told about ad nauseam, </p>
<p>That being said I take issues with your mentioning the term &#8220;business logic&#8221; when talking about REST.</p>
<p>The term &#8220;business logic&#8221; is meaningless in the context of a RESTful service. REST knows about resources and their various representations and nothing else. If or if not posting a resource to an endpoint triggers additional business logic is beyond what is expressible in a RESTful context.</p>
<p>Of course nothing keeps you from *emulating* a service e.g AccountService#addTelephoneNumberToExistingAccount  by posting the *resource* TelephoneNumberAddition &#8211; notice the transition from verb to noun here &#8211; to some endpoint. However, in the context of a ROA &#8211; Resource Orientied Architecture &#8211; as opposed to a SOA this does not constitute a service with some business logic attached to it. It simply means posting a resource.</p>
<p>Note that this reasoning leads to the same conclusion regarding how to properly implement versioning of a REST service (the term service in itself is a little unfortunate here, yet seems to be prevalent by now). Since REST does only know about resources and their representations, since representations are simply different views of the same resource, since resources are clearly central within a RESTful context, and finally since resources are uniquely defined by their URL, it seems natural to realize versioning in the way you described. </p>
<p>But I would argue that a scenario where a &#8220;service&#8221;&#8217;s version is incremented without changing the corresponding resource is beyond the realm of REST. From a RESTful point of view, absolutely nothing has changed, the underlying business logic &#8211; which has changed &#8211; is totally invisible to REST.</p>
<p>REST is not just a different way of publishing services. It&#8217;s an entirely different view of what a service *is*.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

