<?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 on: The Emperor&#8217;s New API</title>
	<atom:link href="http://www.tobyjoe.com/2009/07/the-emperors-new-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/</link>
	<description>Toby Joe Boudreaux on Tech, Creativity, UX, and All Things Digital</description>
	<lastBuildDate>Mon, 28 Nov 2011 13:55:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: tobyjoe</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-961</link>
		<dc:creator>tobyjoe</dc:creator>
		<pubDate>Sat, 11 Jul 2009 01:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-961</guid>
		<description>I came across a great post by the guy working on Recess (PHP framework) that talks about many similar, and some of the same, topics: &lt;a href=&quot;http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers&quot; rel=&quot;nofollow&quot;&gt;Unacceptable Browser Accept Headers&lt;/a&gt;

Good stuff!</description>
		<content:encoded><![CDATA[<p>I came across a great post by the guy working on Recess (PHP framework) that talks about many similar, and some of the same, topics: <a href="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers" rel="nofollow">Unacceptable Browser Accept Headers</a></p>
<p>Good stuff!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tobyjoe</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-958</link>
		<dc:creator>tobyjoe</dc:creator>
		<pubDate>Fri, 10 Jul 2009 13:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-958</guid>
		<description>Hey there, Matthew. Thanks for the comment. 

I want to clarify that I, also, don&#039;t give a rat&#039;s arse what the URL looks like. Rather, I care that a conceptual resource only have one URI for all representations if the resource is described as RESTful. Otherwise it&#039;s misleading and makes generic client libraries hard to develop and obfuscates the set of available resources and representations.

I don&#039;t think interlinking is important, necessarily. Rather, the parts of Dr. Fielding&#039;s thesis (ch05) I&#039;m referencing herein has no requirement that one representation link to another representation. When content negotiation is used, a link actually can&#039;t specify alternate representations, as the URI would be the same and the headers would be used for the negotiation.

As for &quot;...doing it wrong...maybe.&quot; I think the phrase is as helpful as I wanted it to be. That is, it speaks a truth: bolting on new URIs or a new namespace (like api.* subdomains) does stray from one of the major benefits of RESTful design: one URI per concept, with some subset of HTTP 1.1 verbs and some subset of available content types available.

To reiterate: I don&#039;t care what a URI *looks like* and consider URIs opaque. I just want one URI per resource. To use my Twitter example, I want the URI for my most recent 20 statuses (the concept) to be available at the same URI (or URI template) no matter what representation format I choose, if possible. 

As Nick described, there can be strong reasons to stray from the &quot;one URI per resource&quot; rule – usually due to a particular representation (usually the HTML representation) being a clusterfuck of uncacheable, state-based supplemental data. Still, the default, if a system claims to be RESTful, should be to follow to the basic rules. 

Adding URIs for XML and JSON chunks over HTTP is not necessarily RESTful, despite the splintering the term has taken after the Rails bloggers got ahold of it.</description>
		<content:encoded><![CDATA[<p>Hey there, Matthew. Thanks for the comment. </p>
<p>I want to clarify that I, also, don&#8217;t give a rat&#8217;s arse what the URL looks like. Rather, I care that a conceptual resource only have one URI for all representations if the resource is described as RESTful. Otherwise it&#8217;s misleading and makes generic client libraries hard to develop and obfuscates the set of available resources and representations.</p>
<p>I don&#8217;t think interlinking is important, necessarily. Rather, the parts of Dr. Fielding&#8217;s thesis (ch05) I&#8217;m referencing herein has no requirement that one representation link to another representation. When content negotiation is used, a link actually can&#8217;t specify alternate representations, as the URI would be the same and the headers would be used for the negotiation.</p>
<p>As for &#8220;&#8230;doing it wrong&#8230;maybe.&#8221; I think the phrase is as helpful as I wanted it to be. That is, it speaks a truth: bolting on new URIs or a new namespace (like api.* subdomains) does stray from one of the major benefits of RESTful design: one URI per concept, with some subset of HTTP 1.1 verbs and some subset of available content types available.</p>
<p>To reiterate: I don&#8217;t care what a URI *looks like* and consider URIs opaque. I just want one URI per resource. To use my Twitter example, I want the URI for my most recent 20 statuses (the concept) to be available at the same URI (or URI template) no matter what representation format I choose, if possible. </p>
<p>As Nick described, there can be strong reasons to stray from the &#8220;one URI per resource&#8221; rule – usually due to a particular representation (usually the HTML representation) being a clusterfuck of uncacheable, state-based supplemental data. Still, the default, if a system claims to be RESTful, should be to follow to the basic rules. </p>
<p>Adding URIs for XML and JSON chunks over HTTP is not necessarily RESTful, despite the splintering the term has taken after the Rails bloggers got ahold of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-957</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Fri, 10 Jul 2009 09:16:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-957</guid>
		<description>Personally I don&#039;t think Roy Fielding would give a rat&#039;s arse what exactly your feed URL looks like, provided there&#039;s a structured LINK from the html page to the feed resource which spiders can understand and follow.

The linkability part of the restful style seems more important than semantic debates about what constitutes a separate resource and what constitutes a representation of an existing resource. This seems under-specified and not worth worrying overly about. Certainly phrases like &quot;you&#039;re doing it wrong&quot; aren&#039;t helpful.</description>
		<content:encoded><![CDATA[<p>Personally I don&#8217;t think Roy Fielding would give a rat&#8217;s arse what exactly your feed URL looks like, provided there&#8217;s a structured LINK from the html page to the feed resource which spiders can understand and follow.</p>
<p>The linkability part of the restful style seems more important than semantic debates about what constitutes a separate resource and what constitutes a representation of an existing resource. This seems under-specified and not worth worrying overly about. Certainly phrases like &#8220;you&#8217;re doing it wrong&#8221; aren&#8217;t helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tobyjoe</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-954</link>
		<dc:creator>tobyjoe</dc:creator>
		<pubDate>Thu, 09 Jul 2009 23:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-954</guid>
		<description>Ha!

I mostly map it directly to Fielding&#039;s thesis and ignore damn near everything after that (sort of). I think a representation can often be pretty different among formats without impacting the style. I mean, an SVG or PNG representation of a product and an XML representation of the product attributes could be the same concept and same URI. Or not. I think it depends. The loophole/power is definitely in the concept you&#039;re conveying. It&#039;s where the art can come in... or the abuse!

And I think all views can be &quot;REST views&quot; in that the REST style isn&#039;t about the contents of the representations as much as the roles of components/connectors/resources/representations and the transfer mechanisms and rules about the verbs and the mapping of concepts to URIs... 

I am not as dogmatic about the choice, but: 

1. I do love when I have a truly REST-compliant system to work with
2. If you say it, do it and have it make sense, or I will curse you. And there is nothing worse than a tobyjoe curse, obviously!</description>
		<content:encoded><![CDATA[<p>Ha!</p>
<p>I mostly map it directly to Fielding&#8217;s thesis and ignore damn near everything after that (sort of). I think a representation can often be pretty different among formats without impacting the style. I mean, an SVG or PNG representation of a product and an XML representation of the product attributes could be the same concept and same URI. Or not. I think it depends. The loophole/power is definitely in the concept you&#8217;re conveying. It&#8217;s where the art can come in&#8230; or the abuse!</p>
<p>And I think all views can be &#8220;REST views&#8221; in that the REST style isn&#8217;t about the contents of the representations as much as the roles of components/connectors/resources/representations and the transfer mechanisms and rules about the verbs and the mapping of concepts to URIs&#8230; </p>
<p>I am not as dogmatic about the choice, but: </p>
<p>1. I do love when I have a truly REST-compliant system to work with<br />
2. If you say it, do it and have it make sense, or I will curse you. And there is nothing worse than a tobyjoe curse, obviously!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Vlku</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-953</link>
		<dc:creator>Nick Vlku</dc:creator>
		<pubDate>Thu, 09 Jul 2009 21:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-953</guid>
		<description>That&#039;s a great point Toby.  I think a broader question is if the REST view should return the *exact* same content as the HTML view.  

On an e-commerce site, the &quot;people who bought this also bought&quot; list on a product page makes sense in the HTML view.  Does it make sense in a REST view?  (maybe it doesn&#039;t)

Do attributes and their relevance differ for different views of the same model?   (I mean this is clearly the case for the .html view.  For example, most places don&#039;t output things like primary keys on their HTML view.)

I fear that once we codify &quot;REST-compliant&quot; it will morph into what has happened to &quot;agile&quot; where we now have IBM waterfall type-guidelines for &quot;Agile Certified Development.&quot;

Maybe it&#039;s like the Supreme Court with porn.  I know its REST when I see it.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a great point Toby.  I think a broader question is if the REST view should return the *exact* same content as the HTML view.  </p>
<p>On an e-commerce site, the &#8220;people who bought this also bought&#8221; list on a product page makes sense in the HTML view.  Does it make sense in a REST view?  (maybe it doesn&#8217;t)</p>
<p>Do attributes and their relevance differ for different views of the same model?   (I mean this is clearly the case for the .html view.  For example, most places don&#8217;t output things like primary keys on their HTML view.)</p>
<p>I fear that once we codify &#8220;REST-compliant&#8221; it will morph into what has happened to &#8220;agile&#8221; where we now have IBM waterfall type-guidelines for &#8220;Agile Certified Development.&#8221;</p>
<p>Maybe it&#8217;s like the Supreme Court with porn.  I know its REST when I see it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Emery</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-952</link>
		<dc:creator>Jesse Emery</dc:creator>
		<pubDate>Thu, 09 Jul 2009 21:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-952</guid>
		<description>I&#039;ve struggled with the load question as well. I&#039;ve always thought that all the URLs should be pure, although I usually try to write code to respect extensions if a client app is really insisting. Nick, you could actually write this in Restlet pretty easily, but then you have to put a java webserver in front of your apps and you lose all the configurability of an nginx or apache. I&#039;m also guessing that no matter how good NIO is that restlet/grizzly can&#039;t match nginx. It&#039;s easy enough to test if you can figure out the nginx config (I googled and the results made me want more coffee), I&#039;ll write up a restlet front.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve struggled with the load question as well. I&#8217;ve always thought that all the URLs should be pure, although I usually try to write code to respect extensions if a client app is really insisting. Nick, you could actually write this in Restlet pretty easily, but then you have to put a java webserver in front of your apps and you lose all the configurability of an nginx or apache. I&#8217;m also guessing that no matter how good NIO is that restlet/grizzly can&#8217;t match nginx. It&#8217;s easy enough to test if you can figure out the nginx config (I googled and the results made me want more coffee), I&#8217;ll write up a restlet front.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tobyjoe</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-951</link>
		<dc:creator>tobyjoe</dc:creator>
		<pubDate>Thu, 09 Jul 2009 21:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-951</guid>
		<description>Nick I think it depends on how you cache the (presumably) more dynamic &quot;site&quot; content. If your representations are highly cacheable (which is a big goal with REST), the profiles might only differ in the shape of the throughput. Not that it&#039;s unimportant, but it&#039;s probably simple enough to farm out. 

There&#039;s also a possible loophole for *some* highly dynamic &quot;site&quot; resources: treat them as a different concept. Don&#039;t offer alternate representations if those representations are of naturally different concepts.

If you&#039;re showing a chunk of XML for a product on your store at URL_A, but the HTML representation includes lists of recommendations, aggregates from related content objects, etc, you&#039;re *probably* modeling different concepts. 

Most of the time, in my experience, a very divergent &quot;site&quot; representation (aka, dot-html) is more a sign that an alternate format isn&#039;t appropriate. 

I don&#039;t want to make the case that all concepts should support all representation formats through conneg or anything - just that, if you do choose to support multiple representations of the *same* resource, the default should be to use the same URI.

Or, don&#039;t call it REST-compliant?</description>
		<content:encoded><![CDATA[<p>Nick I think it depends on how you cache the (presumably) more dynamic &#8220;site&#8221; content. If your representations are highly cacheable (which is a big goal with REST), the profiles might only differ in the shape of the throughput. Not that it&#8217;s unimportant, but it&#8217;s probably simple enough to farm out. </p>
<p>There&#8217;s also a possible loophole for *some* highly dynamic &#8220;site&#8221; resources: treat them as a different concept. Don&#8217;t offer alternate representations if those representations are of naturally different concepts.</p>
<p>If you&#8217;re showing a chunk of XML for a product on your store at URL_A, but the HTML representation includes lists of recommendations, aggregates from related content objects, etc, you&#8217;re *probably* modeling different concepts. </p>
<p>Most of the time, in my experience, a very divergent &#8220;site&#8221; representation (aka, dot-html) is more a sign that an alternate format isn&#8217;t appropriate. </p>
<p>I don&#8217;t want to make the case that all concepts should support all representation formats through conneg or anything &#8211; just that, if you do choose to support multiple representations of the *same* resource, the default should be to use the same URI.</p>
<p>Or, don&#8217;t call it REST-compliant?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Vlku</title>
		<link>http://www.tobyjoe.com/2009/07/the-emperors-new-api/comment-page-1/#comment-949</link>
		<dc:creator>Nick Vlku</dc:creator>
		<pubDate>Thu, 09 Jul 2009 19:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.tobyjoe.com/?p=816#comment-949</guid>
		<description>I think the biggest problem with actually having one URL is partitioning the load for REST APIs and your &quot;Real&quot; site.

Presumably, you don&#039;t want your entire front-end site to go down if an errant developer floods the API with lots of calls.   Imagine if Facebook did this and their fbconnect API gets overloaded...

I guess you can partition based off header, but that becomes a performance nightmare (in terms of Apache or something doing the routing to different server farms.)

Also, I&#039;ve found that there&#039;s a pretty striking difference between the performance profiles of a web site and a REST API.  (And, it&#039;s inevitably impossible to optimize for both.)

Like the idea in theory though.  And certainly the same app can (and should) power both...</description>
		<content:encoded><![CDATA[<p>I think the biggest problem with actually having one URL is partitioning the load for REST APIs and your &#8220;Real&#8221; site.</p>
<p>Presumably, you don&#8217;t want your entire front-end site to go down if an errant developer floods the API with lots of calls.   Imagine if Facebook did this and their fbconnect API gets overloaded&#8230;</p>
<p>I guess you can partition based off header, but that becomes a performance nightmare (in terms of Apache or something doing the routing to different server farms.)</p>
<p>Also, I&#8217;ve found that there&#8217;s a pretty striking difference between the performance profiles of a web site and a REST API.  (And, it&#8217;s inevitably impossible to optimize for both.)</p>
<p>Like the idea in theory though.  And certainly the same app can (and should) power both&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

