<?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: URLs should express output-format, not source-format</title>
	<atom:link href="http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/</link>
	<description>Unlimited views, cleverness and love</description>
	<lastBuildDate>Wed, 15 Jul 2009 18:01:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: michaelo</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1921</link>
		<dc:creator>michaelo</dc:creator>
		<pubDate>Sun, 05 Jul 2009 19:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1921</guid>
		<description>Hey Alejo,

Thanks for a well though out comment.

I don&#039;t think we are too far away from each other. I agree totally regarding the language, as this is possible to check i.e. the browser-settings. And the language doesn&#039;t change the file format. But language and format-headers are from two different sides - the format is &quot;forced&quot; from the server, while the language is requested by the client.

What I didn&#039;t mention is that I believe it&#039;s good practice to have fallbacks, either by &quot;best fit from what I can sniff - content negotiaton&quot;, or sometimes by directly defined defaults. What I still do mean is that the extension is an important hint to the users when considering what the resource is. And that when data is available in multiple formats it should/could be possible to overrule that by the extension as the URI points to the same data, but we&#039;d might want it in a different format.

It&#039;s alsom important to mention that the software requesting the resource  should of course consider the Content-Type-header over the extension.

I&#039;m checking out svnwiki, it seems like a good project that might come handy. Thanks for the links!</description>
		<content:encoded><![CDATA[<p>Hey Alejo,</p>
<p>Thanks for a well though out comment.</p>
<p>I don&#8217;t think we are too far away from each other. I agree totally regarding the language, as this is possible to check i.e. the browser-settings. And the language doesn&#8217;t change the file format. But language and format-headers are from two different sides &#8211; the format is &#8220;forced&#8221; from the server, while the language is requested by the client.</p>
<p>What I didn&#8217;t mention is that I believe it&#8217;s good practice to have fallbacks, either by &#8220;best fit from what I can sniff &#8211; content negotiaton&#8221;, or sometimes by directly defined defaults. What I still do mean is that the extension is an important hint to the users when considering what the resource is. And that when data is available in multiple formats it should/could be possible to overrule that by the extension as the <acronym title="Uniform Resource Identifier">URI</acronym> points to the same data, but we&#8217;d might want it in a different format.</p>
<p>It&#8217;s alsom important to mention that the software requesting the resource  should of course consider the Content-Type-header over the extension.</p>
<p>I&#8217;m checking out svnwiki, it seems like a good project that might come handy. Thanks for the links!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dwdwdw</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1930</link>
		<dc:creator>dwdwdw</dc:creator>
		<pubDate>Fri, 03 Jul 2009 03:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1930</guid>
		<description>If you take that approach, then there probably isn&#039;t a single conforming HTTP implementation on the entire Internet. I wouldn&#039;t call it broken, no.</description>
		<content:encoded><![CDATA[<p>If you take that approach, then there probably isn&#8217;t a single conforming <acronym title="HyperText Transfer Protocol">HTTP</acronym> implementation on the entire Internet. I wouldn&#8217;t call it broken, no.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eadmund</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1929</link>
		<dc:creator>eadmund</dc:creator>
		<pubDate>Thu, 02 Jul 2009 21:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1929</guid>
		<description>&gt; The closest we have to a standard would be HTTP, which most would rather not duplicate the &quot;Content-Accept&quot; and &quot;Accept-Language&quot; functionality of when defining their HTTP URLs.

Well, those are there for _exactly_ this kind of usage pattern.  Tools which don&#039;t support them are borken, don&#039;t you think?</description>
		<content:encoded><![CDATA[<p>&gt; The closest we have to a standard would be <acronym title="HyperText Transfer Protocol">HTTP</acronym>, which most would rather not duplicate the &#8220;Content-Accept&#8221; and &#8220;Accept-Language&#8221; functionality of when defining their <acronym title="HyperText Transfer Protocol">HTTP</acronym> URLs.</p>
<p>Well, those are there for _exactly_ this kind of usage pattern.  Tools which don&#8217;t support them are borken, don&#8217;t you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dwdwdw</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1928</link>
		<dc:creator>dwdwdw</dc:creator>
		<pubDate>Thu, 02 Jul 2009 19:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1928</guid>
		<description>There are a number of sides to this, none of which I&#039;m really versed in.

I guess it depends on your notion of a resource: &quot;microsoft.com&quot; could be thought of as a resource, however in practice it is useful to include subaddresses like &quot;msdn&quot; or &quot;/docs/blah.html&quot; when referring to this resource. Similarly, notions such as file format, natural language and character encoding used can be thought of as indexes for projections of a multi-dimensional root resource.

There is a greyish line here that isn&#039;t well defined across the different Internet protocols. The closest we have to a standard would be HTTP, which most would rather not duplicate the &quot;Content-Accept&quot; and &quot;Accept-Language&quot; functionality of when defining their HTTP URLs. However, that doesn&#039;t make doing so invalid.

Including as much specifics of a resource in the URL has several advantages, for example, simplistic software that handles URLs can be trivially taught to address language and encoding variations of a resource without extra code. You can see this today e.g. in the W3C&#039;s feed validator. In this scenario the resource&#039;s projections are often included as child parts of the URL&#039;s path. You can see some examples of this in the GData APIs, or anywhere you&#039;ve ever seen something like &quot;/docs/help/en.html&quot;. Such a subaddress does not occlude the existence of &quot;/docs/help&quot;, in fact there&#039;s no reason why the two styles can&#039;t be used as part of a single scheme.

There are other issues, some theoretical and some practical, but I have no idea where I read about any of this, sorry.</description>
		<content:encoded><![CDATA[<p>There are a number of sides to this, none of which I&#8217;m really versed in.</p>
<p>I guess it depends on your notion of a resource: &#8220;microsoft.com&#8221; could be thought of as a resource, however in practice it is useful to include subaddresses like &#8220;msdn&#8221; or &#8220;/docs/blah.html&#8221; when referring to this resource. Similarly, notions such as file format, natural language and character encoding used can be thought of as indexes for projections of a multi-dimensional root resource.</p>
<p>There is a greyish line here that isn&#8217;t well defined across the different Internet protocols. The closest we have to a standard would be <acronym title="HyperText Transfer Protocol">HTTP</acronym>, which most would rather not duplicate the &#8220;Content-Accept&#8221; and &#8220;Accept-Language&#8221; functionality of when defining their <acronym title="HyperText Transfer Protocol">HTTP</acronym> URLs. However, that doesn&#8217;t make doing so invalid.</p>
<p>Including as much specifics of a resource in the <acronym title="Uniform Resource Locator">URL</acronym> has several advantages, for example, simplistic software that handles URLs can be trivially taught to address language and encoding variations of a resource without extra code. You can see this today e.g. in the <acronym title="World Wide Web Consortium">W3C</acronym>&#8217;s feed validator. In this scenario the resource&#8217;s projections are often included as child parts of the <acronym title="Uniform Resource Locator">URL</acronym>&#8217;s path. You can see some examples of this in the GData APIs, or anywhere you&#8217;ve ever seen something like &#8220;/docs/help/en.html&#8221;. Such a subaddress does not occlude the existence of &#8220;/docs/help&#8221;, in fact there&#8217;s no reason why the two styles can&#8217;t be used as part of a single scheme.</p>
<p>There are other issues, some theoretical and some practical, but I have no idea where I read about any of this, sorry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alejo</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1908</link>
		<dc:creator>Alejo</dc:creator>
		<pubDate>Thu, 02 Jul 2009 00:20:58 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1908</guid>
		<description>I don&#039;t think you should aim for URLs that specify the particular representation (what you refer to as &#039;output&#039;) used.

For instance, if the user is loading an image, he shouldn&#039;t have to use different URLs depending on whether he wants to get the version in JPEG or in PNG format.  He should be able to just give the URL that uniquely identifies the image; it is the job of the HTTP headers (ie. the content negotiation) to figure out which of the available representations is preferred.

The same goes for the language, he shouldn&#039;t have to switch from &#039;index.en&#039; (or, worse, &#039;index.en.html&#039;) to &#039;index.es&#039; (or &#039;index.es.html&#039;) to change the language; instead the right headers for picking the language should be used.

For my CMS (svnwiki, http://wiki.freaks-unidos.net/svnwiki) the approach that I&#039;m taking is to not show the format in the URL by default and use Apache&#039;s Content Negotiation module to handle these things smartly.  I really like the approach offered by Apache&#039;s Content Negotiation module, where you can say &#039;index&#039; (pick the best language and format), &#039;index.en&#039; (pick the best format, but force that language) or &#039;index.en.html&#039; (to fully specify language and format).  This works very beautifully with the &#039;Baked, not Fried&#039; approach (http://wiki.freaks-unidos.net/pre-rendered%20model).</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think you should aim for URLs that specify the particular representation (what you refer to as &#8216;output&#8217;) used.</p>
<p>For instance, if the user is loading an image, he shouldn&#8217;t have to use different URLs depending on whether he wants to get the version in <acronym title="Joint Photographics Experts Group">JPEG</acronym> or in <acronym title="Portable Network Graphics">PNG</acronym> format.  He should be able to just give the <acronym title="Uniform Resource Locator">URL</acronym> that uniquely identifies the image; it is the job of the <acronym title="HyperText Transfer Protocol">HTTP</acronym> headers (ie. the content negotiation) to figure out which of the available representations is preferred.</p>
<p>The same goes for the language, he shouldn&#8217;t have to switch from &#8216;index.en&#8217; (or, worse, &#8216;index.en.html&#8217;) to &#8216;index.es&#8217; (or &#8216;index.es.html&#8217;) to change the language; instead the right headers for picking the language should be used.</p>
<p>For my <acronym title="Content Management System">CMS</acronym> (svnwiki, <a href="http://wiki.freaks-unidos.net/svnwiki)" rel="nofollow">http://wiki.freaks-unidos.net/svnwiki)</a> the approach that I&#8217;m taking is to not show the format in the <acronym title="Uniform Resource Locator">URL</acronym> by default and use Apache&#8217;s Content Negotiation module to handle these things smartly.  I really like the approach offered by Apache&#8217;s Content Negotiation module, where you can say &#8216;index&#8217; (pick the best language and format), &#8216;index.en&#8217; (pick the best format, but force that language) or &#8216;index.en.html&#8217; (to fully specify language and format).  This works very beautifully with the &#8216;Baked, not Fried&#8217; approach (<a href="http://wiki.freaks-unidos.net/pre-rendered%20model" rel="nofollow">http://wiki.freaks-unidos.net/pre-rendered%20model</a>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michaelo</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1907</link>
		<dc:creator>michaelo</dc:creator>
		<pubDate>Wed, 01 Jul 2009 23:49:05 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1907</guid>
		<description>Hey S,

That&#039;s correct - and probably one of the best as it helps with the separation of URL&#039;s and the physical files.

Now, I do not think that it isn&#039;t honest to server &quot;static&quot; file-types with parameters, although I agree that it might seem a little weird as it&#039;s - as far as I&#039;ve experienced - mainly because it&#039;s not what we&#039;re used to. But that&#039;s something I&#039;d like to see change. I think it&#039;s a very good point you&#039;re making there none the less.</description>
		<content:encoded><![CDATA[<p>Hey S,</p>
<p>That&#8217;s correct &#8211; and probably one of the best as it helps with the separation of <acronym title="Uniform Resource Locator">URL</acronym>&#8217;s and the physical files.</p>
<p>Now, I do not think that it isn&#8217;t honest to server &#8220;static&#8221; file-types with parameters, although I agree that it might seem a little weird as it&#8217;s &#8211; as far as I&#8217;ve experienced &#8211; mainly because it&#8217;s not what we&#8217;re used to. But that&#8217;s something I&#8217;d like to see change. I think it&#8217;s a very good point you&#8217;re making there none the less.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: S Jones</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1906</link>
		<dc:creator>S Jones</dc:creator>
		<pubDate>Wed, 01 Jul 2009 23:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1906</guid>
		<description>Isn&#039;t your idea completely handled by Apache (or IIS) URL rewriting? mod_rewrite: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

You can use that to make static-looking URLS (mydomain.com/graphics/somefile.jpg) which actual point to dynamic data (mydomain.com/graphicserver.php?get=somefile.jpg).

Also, in my opinion, making the scripted/dynamic content look like a static file is OK until it is parameterized. Once you start adding foo=bar parameters, you might as well be honest about it being scripted.</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t your idea completely handled by Apache (or <acronym title="Internet Information Services">IIS</acronym>) <acronym title="Uniform Resource Locator">URL</acronym> rewriting? mod_rewrite: <a href="http://httpd.apache.org/docs/2.0/misc/rewriteguide.html" rel="nofollow">http://httpd.apache.org/docs/2.0/misc/rewriteguide.html</a></p>
<p>You can use that to make static-looking URLS (mydomain.com/graphics/somefile.jpg) which actual point to dynamic data (mydomain.com/graphicserver.php?get=somefile.jpg).</p>
<p>Also, in my opinion, making the scripted/dynamic content look like a static file is OK until it is parameterized. Once you start adding foo=bar parameters, you might as well be honest about it being scripted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michaelo</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1905</link>
		<dc:creator>michaelo</dc:creator>
		<pubDate>Wed, 01 Jul 2009 23:05:13 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1905</guid>
		<description>Hey Adam, and thanks for a good response.

I completely agree with you that the Content-Type is the most important one, especially with regards to the UA&#039;s. And I also agree that the URL&#039;s shouldn&#039;t necessarily (ideally) have to match any real files at all (I see from my examples that it didn&#039;t come through good enough) - but that&#039;s not the real case here. I&#039;m thinking of the URL&#039;s as presented to the clients (which might be parsed as anything you&#039;d like for the servers). UA&#039;s should also completely ignore the file-extension (except for i.e &quot;application/octet-stream&quot; where the extension might provide a hint if none good hints is given by the file-content).

Indeed browsers are some very forgiving creatures.

My intensions with this post were primarily for the users, not the user-agents. In essence I&#039;d like the extension to comply with the content, not define (while it, although, indirectly will if used consistently).</description>
		<content:encoded><![CDATA[<p>Hey Adam, and thanks for a good response.</p>
<p>I completely agree with you that the Content-Type is the most important one, especially with regards to the UA&#8217;s. And I also agree that the <acronym title="Uniform Resource Locator">URL</acronym>&#8217;s shouldn&#8217;t necessarily (ideally) have to match any real files at all (I see from my examples that it didn&#8217;t come through good enough) &#8211; but that&#8217;s not the real case here. I&#8217;m thinking of the <acronym title="Uniform Resource Locator">URL</acronym>&#8217;s as presented to the clients (which might be parsed as anything you&#8217;d like for the servers). UA&#8217;s should also completely ignore the file-extension (except for i.e &#8220;application/octet-stream&#8221; where the extension might provide a hint if none good hints is given by the file-content).</p>
<p>Indeed browsers are some very forgiving creatures.</p>
<p>My intensions with this post were primarily for the users, not the user-agents. In essence I&#8217;d like the extension to comply with the content, not define (while it, although, indirectly will if used consistently).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eadmund</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1927</link>
		<dc:creator>eadmund</dc:creator>
		<pubDate>Wed, 01 Jul 2009 22:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1927</guid>
		<description>Extraordinarily bad advice: fail to ignore it at your own peril!

URLs are uniform _resource_ locators; a resource doesn&#039;t have a particular format.  That should be obvious: an image could be a JPEG or PNG or TIFF or GIF and yet contain exactly the same data--and thus be the same resource.</description>
		<content:encoded><![CDATA[<p>Extraordinarily bad advice: fail to ignore it at your own peril!</p>
<p>URLs are uniform _resource_ locators; a resource doesn&#8217;t have a particular format.  That should be obvious: an image could be a <acronym title="Joint Photographics Experts Group">JPEG</acronym> or <acronym title="Portable Network Graphics">PNG</acronym> or <acronym title="Tagged Image File Format">TIFF</acronym> or <acronym title="Graphics Interchange Format">GIF</acronym> and yet contain exactly the same data&#8211;and thus be the same resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://michaelodden.com/webdevelopment/urls-should-express-output-format-not-source-format/comment-page-1/#comment-1904</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Wed, 01 Jul 2009 21:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://michaelodden.com/?p=296#comment-1904</guid>
		<description>The issue here is that extensions are for the host server not the client browser. The client browser should use the Content-type HTML header to decide what to do with it. 

Even then, browsers are built to expect cruddy data, so if you feed it an image/png and the image _actually_ is a jpeg, the browser will figure it out from the image.

I don&#039;t believe the extension should define the output format, since the extension is defined on the server which, as you say, could interpret it in different ways.

AFAIK, according to the W3C specs, URLs should be pretty much disconnected from the whole data that comes from it. i.e. You should be able to navigate to http://wobble.blip.com/hooo?haa#hee!!!.xml=woo and the document to render correctly.</description>
		<content:encoded><![CDATA[<p>The issue here is that extensions are for the host server not the client browser. The client browser should use the Content-type <acronym title="HyperText Markup Language">HTML</acronym> header to decide what to do with it. </p>
<p>Even then, browsers are built to expect cruddy data, so if you feed it an image/png and the image _actually_ is a jpeg, the browser will figure it out from the image.</p>
<p>I don&#8217;t believe the extension should define the output format, since the extension is defined on the server which, as you say, could interpret it in different ways.</p>
<p><acronym title="As far as I know">AFAIK</acronym>, according to the <acronym title="World Wide Web Consortium">W3C</acronym> specs, URLs should be pretty much disconnected from the whole data that comes from it. i.e. You should be able to navigate to <a href="http://wobble.blip.com/hooo?haa#hee" rel="nofollow">http://wobble.blip.com/hooo?haa#hee</a>!!!.xml=woo and the document to render correctly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
