<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Backdrifter &#187; http</title>
	<atom:link href="http://www.backdrifter.com/tags/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.backdrifter.com</link>
	<description>The personal site of Jared Hanson</description>
	<lastBuildDate>Tue, 22 Jun 2010 22:16:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTTP-based Protocol to Replace IMAP?</title>
		<link>http://www.backdrifter.com/2008/08/05/http-based-protocol-to-replace-imap/</link>
		<comments>http://www.backdrifter.com/2008/08/05/http-based-protocol-to-replace-imap/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 05:16:21 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[xmpp]]></category>
		<category><![CDATA[xmppsummit5]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/?p=104</guid>
		<description><![CDATA[During a discussion at XMPP Summit 5, it was briefly suggested that XMPP could serve as a replacement for IMAP, a standard protocol for accessing electronic mailboxes and messages.  While there are some optimizations that could be achieved with XMPP, IMAP is a well-entrenched protocol that will be around for decades to come.
I had [...]]]></description>
			<content:encoded><![CDATA[<p>During a discussion at <a href="http://www.xmpp.org/summit/summit5.shtml">XMPP Summit 5</a>, it was briefly suggested that <a href="http://en.wikipedia.org/wiki/XMPP">XMPP</a> could serve as a replacement for <a href="http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol">IMAP</a>, a standard protocol for accessing electronic mailboxes and messages.  While there are some optimizations that could be achieved with XMPP, IMAP is a well-entrenched protocol that will be around for decades to come.</p>
<p>I had a brief conversation with <a href="http://weblogs.mozillazine.org/dmose/">Dan Mosedale</a>, of the <a href="http://www.mozillamessaging.com/">Mozilla Messaging</a> crew, where I stated my stance that such a replacement is non-pragmatic.  He suggested something interesting: most mail access today is not via IMAP, but via the web.</p>
<p><span id="more-104"></span></p>
<p>That is a perspective I hadn&#8217;t considered, but it is certainly true.  Most people receive email through <a href="http://www.microsoft.com/">Microsoft</a>, <a href="http://www.yahoo.com/">Yahoo</a>, <a href="http://www.google.com/">Google</a>, or <a href="http://www.aol.com/">AOL</a>.  Through the use of <a href="http://en.wikipedia.org/wiki/AJAX">Ajax</a> techniques, much of this mail is being delivered over HTTP.  It is by no means a stretch to imagine IMAP being replaced by an HTTP-based protocol, given an effort to standardize the data format transmitted in the requests and responses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2008/08/05/http-based-protocol-to-replace-imap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>oEmbed FAIL! Represent RESTfully.</title>
		<link>http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/</link>
		<comments>http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/#comments</comments>
		<pubDate>Fri, 09 May 2008 22:12:14 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oembed]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xrds]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/</guid>
		<description><![CDATA[oEmbed is the latest standard to come out of the Web 2.0 developer crowd.  While I&#8217;m typically a huge advocate of standards, and think much of the prior work has been superb, oEmbed fails on almost every level.  So much so, in fact, that I&#8217;m writing this post to declare it worthless, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oembed.com/">oEmbed</a> is the latest standard to <a href="http://www.readwriteweb.com/archives/oembed_open_format.php">come out</a> of the Web 2.0 developer crowd.  While I&#8217;m typically a huge advocate of standards, and think much of the prior work has been superb, oEmbed fails on almost every level.  So much so, in fact, that I&#8217;m writing this post to declare it worthless, and suggest an alternative.</p>
<p>Upon first seeing the spec, I immediately <a href="http://twitter.com/jaredhanson/statuses/807531511">tweeted</a>:</p>
<blockquote><p>
oEmbed completely ignores REST principles. GET with a Content-Type to the original resource. Benefit: a single URL per resource. C&#8217;mon!
</p></blockquote>
<p>Allow me to further explain&#8230;</p>
<p><span id="more-95"></span></p>
<p>To begin with, let&#8217;s dive into the <a href="http://oembed.com/">specification</a>, and take note of the things that immediately raise red flags.</p>
<blockquote><p>
An oEmbed exchange occurs between a consumer and a provider. A consumer wishes to show an embedded representation of a third party resource on their own web site, such as a photo or an embedded video. A provider implements the oEmbed API to allow consumers to fetch that representation.
</p></blockquote>
<p>Hmm&#8230; that sounds suspiciously like an <a href="http://en.wikipedia.org/wiki/HTTP">HTTP</a> GET request.  Why the need to refer to this as &#8220;the oEmbed API&#8221;?!?  Something suspect must be about to go down.</p>
<blockquote><p>
Configuration for oEmbed is very simple. Providers must specify one or more URL scheme and API endpoint pairs. The URL scheme describes which URLs provided by the service may have an embedded representation. The API endpoint describes where the consumer may request representations for those URLs.
</p></blockquote>
<p>Wait&#8230; what?  This oEmbed thing requires two <a href="http://en.wikipedia.org/wiki/URL">URL</a>s to fetch different representations of the same resource?  Have we not learned even the most rudimentary <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a> principles in the past few years?  Here&#8217;s a quick lesson: a single resource can have multiple representations.  One URL, multiple data formats.  Once that is understood, the need for an oEmbed API endpoint drops away entirely.</p>
<p>Even so, let&#8217;s be pragmatic and use oEmbed, since some respectable providers have already implemented support for it. (Which begs further questions, but I&#8217;ll let that slide.)  To start, we need to get the address of the API endpoint.  That mechanism is not specified, so we&#8217;ll have to resort to hardcoding endpoints.  <a href="http://en.wikipedia.org/wiki/XRDS">XRDS</a> could be useful here, but that introduces further complications.  Besides, there is better way.</p>
<p><b>oEmbed with REST to the Rescue!</b></p>
<p>Since the URL to the original resource must be known, and an oEmbed representation is desired, the oEmbed API endpoint is completely unnecessary.  Just request the oEmbed representation from the resource directly.<br />
<code><br />
GET /photos/bees/2362225867/ HTTP/1.1<br />
Host: flickr.com<br />
Accept: application/oembed+xml<br />
</code></p>
<p>Flickr could then respond with our embed-ready resource.<br />
<code><br />
HTTP/1.x 200 OK<br />
Content-Type: application/oembed+xml<br />
&nbsp;<br />
&lt;oembed&gt;<br />
&lt;version&gt;1.0&lt;/version&gt;<br />
&lt;type&gt;photo&lt;/type&gt;<br />
&lt;title&gt;Bacon Lollys&lt;/title&gt;<br />
&lt;author_name&gt;bees&lt;/author_name&gt;<br />
&lt;author_url&gt;http://www.flickr.com/photos/bees/&lt;/author_url&gt;<br />
&lt;cache_age&gt;3600&lt;/cache_age&gt;<br />
&lt;provider_name&gt;Flickr&lt;/provider_name&gt;<br />
&lt;provider_url&gt;http://www.flickr.com/&lt;/provider_url&gt;<br />
&lt;width&gt;500&lt;/width&gt;<br />
&lt;height&gt;375&lt;/height&gt;<br />
&lt;url&gt;http://farm4.static.flickr.com/3040/2362225867_4a87ab8baf.jpg&lt;/url&gt;<br />
&lt;/oembed&gt;<br />
</code></p>
<p>See that! There is absolutely zero requirement for the oEmbed API.  All we need to do is define a couple data formats and the associated <a href="http://en.wikipedia.org/wiki/MIME_type">MIME types</a>.  While there is evidence of duplicative effort, the oEmbed formats look reasonable and have both <a href="http://en.wikipedia.org/wiki/XML">XML</a> and <a href="http://en.wikipedia.org/wiki/JSON">JSON</a> output.  I propose we define them as <code>application/oembed+xml</code> and <code>application/oembed+json</code>.</p>
<p>Error handling is equally trivial.  If support for RESTful oEmbed is not implemented, a standard HTTP <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7">406 Not Acceptable</a> status code would be returned to the client.  The client could then fail over to screen scraping or proprietary APIs as necessary.</p>
<p>I hope I&#8217;ve outlined my case against oEmbed effectively.  If anyone has any questions or concerns, drop a line in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>What is a Web Browser?</title>
		<link>http://www.backdrifter.com/2008/01/17/what-is-a-web-browser/</link>
		<comments>http://www.backdrifter.com/2008/01/17/what-is-a-web-browser/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 06:27:01 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/2008/01/17/what-is-a-web-browser/</guid>
		<description><![CDATA[In response to my previous post about Apple and their use of site-specific browsers, Joe Clark replied with the following:

They aren’t “browsers” because they aren’t browsing the Web. In specific, the iTunes (Music) Store is not HTML.
Unless of course you are advocating an expansion of the meaning of the term.

Rather than advocating an expansion of [...]]]></description>
			<content:encoded><![CDATA[<p>In response to my previous <a href="http://www.backdrifter.com/2008/01/16/apple-and-the-site-specific-browser/">post</a> about Apple and their use of site-specific browsers, <a href="http://blog.fawny.org/">Joe Clark</a> <a href="http://www.backdrifter.com/2008/01/16/apple-and-the-site-specific-browser/#reply-9395">replied</a> with the following:</p>
<blockquote><p>
They aren’t “browsers” because they aren’t browsing the Web. In specific, the iTunes (Music) Store is not HTML.</p>
<p>Unless of course you are advocating an expansion of the meaning of the term.
</p></blockquote>
<p>Rather than advocating an expansion of meaning, I&#8217;d suggest that the term has been wrongly narrowly categorized.  Allow me to explain&#8230;</p>
<p><span id="more-83"></span></p>
<p>To begin, I&#8217;ll paraphrase the first sentence of <a href="http://www.wikipedia.org/">Wikipedia</a>&#8217;s entry on <a href="http://en.wikipedia.org/wiki/Web_browser">Web browser</a>:</p>
<blockquote><p>
A web browser is a software application that enables a user to display and interact with text, images, videos, music and other information located on a network.
</p></blockquote>
<p>A typical web browser (including <a href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx">Internet Explorer</a>, <a href="http://www.apple.com/safari/">Safari</a>, and <a href="http://www.mozilla.com/firefox/">Firefox</a>), relies on three primary technologies: <a href="http://en.wikipedia.org/wiki/HTTP">HTTP</a>, <a href="http://en.wikipedia.org/wiki/HTML">HTML</a>, and <a href="http://en.wikipedia.org/wiki/URL">URL</a>s.</p>
<p>A URL is simply an address to a resource that is available on a network.  When a URL is entered into a web browser, HTTP is used to allow the web browser and a web server to communicate with one another.  The server sends the browser a document marked up using HTML, which the browser is able to display on screen.</p>
<p>What makes the web interesting is the concept of a <a href="http://en.wikipedia.org/wiki/Hyperlink">hyperlink</a>.</p>
<p>A hyperlink is a way to point to other resources on the network.  For example, links to my site can be constructed with the following HTML:<br />
<code><br />
&lt;a href="http://www.backdrifter.com/"&gt;Backdrifter&lt;/a&gt;<br />
</code></p>
<p>The browser understands that markup and displays it as a link to my weblog.  If the link is clicked, the browser will load my site.  The act of browsing is simply a matter of clicking a series of links, thus loading a sequence of URLs.</p>
<p>Unfortunately, people tend to associate hyperlinks directly with HTML, even though their use is not limited to HTML.  The <a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a> describes how to apply the concept of links to non-HTML data formats.</p>
<p>However, I suspect the bigger objection is the use of the term &#8220;browser&#8221; for applications that don&#8217;t leave the original website.  This situation occurs naturally when a server only serves links that point back to itself.  It&#8217;s important to realize, though, that a subset of the web is still the web.</p>
<p>Returning to the original definition and the architecture guidelines published by the <a href="http://www.w3.org/">W3C</a>, it is my contention that the term &#8220;web browser&#8221; makes no particular restriction on the use of transport protocol or document format.  It is simply an application that allows a person to display and interact with resources represented by URLs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2008/01/17/what-is-a-web-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Message Passing Web</title>
		<link>http://www.backdrifter.com/2006/10/15/the-message-passing-web/</link>
		<comments>http://www.backdrifter.com/2006/10/15/the-message-passing-web/#comments</comments>
		<pubDate>Mon, 16 Oct 2006 01:48:36 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[http]]></category>
		<category><![CDATA[objectivec]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/2006/10/15/the-message-passing-web/</guid>
		<description><![CDATA[Objective-C is hands-down my favorite programming language.  Even though I was taught primarily C++ in college, and indeed spend most of my time coding in that language, I consider knowledge of Objective-C to have given me the most useful insights into software design and architecture.
My Objective-C leanings lead me to use Ruby as a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/">Objective-C</a> is hands-down my favorite programming language.  Even though I was taught primarily C++ in college, and indeed spend most of my time coding in that language, I consider knowledge of Objective-C to have given me the most useful insights into software design and architecture.</p>
<p>My Objective-C leanings lead me to use <a href="http://www.ruby-lang.org/">Ruby</a> as a scripting language.  Ruby has been propelled into the spotlight recently by <a href="http://www.rubyonrails.org/">Ruby on Rails</a>, an incredible framework for developing web applications.</p>
<p>Objective-C and Ruby are both descendants of <a href="http://www.smalltalk.org/">Smalltalk</a>.  All three languages are object-oriented, and have the notion of message passing as a central construct.  Message passing is not found in more popular languages like C++ and <a href="http://java.sun.com/">Java</a>, yet understanding it can give any developer an invaluable new perspective.</p>
<p><span id="more-10"></span></p>
<p>In an attempt to further my understanding of these concepts, I&#8217;ve recently been studying Smalltalk.  While having been around for more than 30 years, the concepts behind the language are still considered state-of-the-art and its influence is broad.  That influence extends all the way to the web, as I discovered in a recent <a href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&#038;entry=3338189012">entry</a> by James Robertson.</p>
<p>Found in the comments is a link to an <a href="http://www.w3.org/People/Connolly/9703-web-apps-essay.html">editorial</a> by <a href="http://www.w3.org/People/Connolly/">Dan Connolly</a>, dated February 13, 1997.  From the article:</p>
<blockquote><p>
HTTP was design as a distributed realization of the Objective C (originally Smalltalk) message passing infrastructure: the first few bytes of every HTTP message are a method name: GET or POST. Uniform Resource Locator is just the result of squeezing the term object reference through the IETF standardization process.
</p></blockquote>
<p>Recent projects have caused me to view the web as just such a distributed object system.  However, I was not aware of the historical link to Objective-C and Smalltalk.  Seen in that light, though, the message passing approach is remarkably consistent.</p>
<p>David Heinemeier Hansson, the creator of Ruby on Rails, is a true innovator in the web application frontier.  His addition of Active Resource to edge Rails is the natural next step in this line of thinking.  In his <a href="http://blog.scribestudio.com/articles/2006/07/09/david-heinemeier-hansson-railsconf-2006-keynote-address">keynote address</a> at <a href="http://www.railsconf.org/">RailsConf 2006</a>, he gives a compelling presentation about the benefits of <a href="http://www.loudthinking.com/arc/000593.html">discovering</a> a world of resources.</p>
<p>Message passing languages are efficient and productive for application development.  Unfortunately, they have a minority stake of developer mindshare.  Ruby and Rails are currently improving this situation.  It may be wishful thinking, but I&#8217;d like to see these trends renew interest in Objective-C and Smalltalk as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2006/10/15/the-message-passing-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
