<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Kris Jordan</title>
	
	<link>http://www.krisjordan.com</link>
	<description>on Software, Frameworks, &amp; Stuff</description>
	<lastBuildDate>Tue, 25 Aug 2009 03:49:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/KrisJordan" /><feedburner:info uri="krisjordan" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>On Muted Methods, Fluent Interfaces, and Bar Game</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/pZKKhibmzTQ/</link>
		<comments>http://www.krisjordan.com/2009/08/24/on-muted-methods-and-fluent-interfaces/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 03:47:02 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=595</guid>
		<description><![CDATA[One night a weekend back I went out to the local bar back home with my younger sister some of our friends. Back home means Rutherfordton, North Carolina. The kind of charming area that greets you at the county line with the road sign &#8220;Welcome to Rutherford County, Small Town Friendly&#8221;. A friendly place, it [...]]]></description>
			<content:encoded><![CDATA[<p>One night a weekend back I went out to the local bar back home with my younger sister some of our friends. Back home means Rutherfordton, North Carolina. The kind of charming area that greets you at the county line with the road sign &#8220;Welcome to Rutherford County, Small Town Friendly&#8221;. A friendly place, it is.</p>
<p>While sitting at the bar one of my sisters&#8217; friends drew a lot of attention from the gentlemen of Rutherford County. We&#8217;ll call her Liz (gah, when does 30Rock start up again??). Some would come up and chat, others ask for a dance. The most peculiar case of them all was one who had been ordering drinks from across the bar and finally got up the courage to come over and, without a word, slip Liz a piece of paper with his phone number on it before disappearing into the night.</p>
<p>Yes, this post is about programming, bear with me.</p>
<p>Let&#8217;s give this guy, say Dennis, the benefit of the doubt and assume that these tactics have worked before with success. On this particular night with a gorgeous girl from out of town: no dice. Dennis wouldn&#8217;t get the callback.</p>
<p>Let&#8217;s pseudo-code this scenario:</p>
<pre>$liz = new AttractiveOutOfTownGirl();
$dennis = new SmallTownFriendlyYoungMan();
$liz-&gt;setDrink($dennis-&gt;buyDrink('Vodka Redbull'));
$liz-&gt;setDrink($dennis-&gt;buyDrink('Sex on the Beach'));
$liz-&gt;receiveNumber($dennis-&gt;getPagerNumber());
$dennis-&gt;disappearIntoTheNight();</pre>
<p>Spot any patterns? Thrice Dennis has taken an action that results in some value: he&#8217;s bought 2 drinks and retrieved his pager number. All of his methods have resulted in some value that is handed to Liz and he&#8217;s getting no acknowledgement back. He interacted with <strong>muted methods</strong>. Dennis&#8217; shot at success depended on Liz having some internal, finite state machine that transitioned from &#8220;stranger&#8221; to  &#8220;stranger willing to call a stranger&#8221; with every additional drink. How could this have gone better for Dennis?</p>
<p>Before we get there let&#8217;s talk about <strong>muted methods</strong>. Procedures. Voids. <strong>Black holes in programs where input results in no output. Scary stuff!</strong> But why, what&#8217;s so bad about muted functions? Let&#8217;s nitpick our example. It is so  <em>choppy</em>. Do you feel the <em>choppiness</em>?</p>
<pre>Noun verb.
Noun verb.
Noun verb.
Liz set drink.
Liz set drink.
Liz give number.</pre>
<p>When your verb is muted, there&#8217;s nothing more to be said. End of story. Next line. You&#8217;ve got nothing to play off of, no chance to converse. <strong>When you&#8217;re working with muted functions you have no segue</strong>. You&#8217;re giving without receiving.</p>
<p>If muted functions are the problem, how could this scene look a little less ugly? Perhaps Dennis could have conversed with Liz. Interacted with her. Made use of a more <strong>fluent interface</strong>&#8230;</p>
<pre>$dennis-&gt;saysTo($liz, "Hey girl, from out of town?") // returns $liz
       -&gt;saysTo($dennis, "Yes, how'd you know?") // returns $dennis
       -&gt;saysTo($liz, "Never did seen you before!") // returns $liz
       -&gt;isStillSmiling()
       ? // If she's smiling
   $liz-&gt;setDrink($dennis-&gt;buyDrink('Vodka Redbull')) // returns $liz
       -&gt;saysTo($dennis, "Thanks, you're kind of cute.")
       -&gt;saysTo($liz, "That's how we're grown here. Can I call you?")
       -&gt;saysTo($dennis, "Sure, my name is Liz and the number is...")
       -&gt;punchesInNumber("919-928-9090") // returns $dennis
       -&gt;says("Great, call you tomorrow!") // returns $dennis
       -&gt;disappearIntoTheNight()
       : // If she's frowning
$dennis-&gt;movesAlong();</pre>
<p>When you&#8217;re not dealing with muted methods you give your code the chance to come to life in a more fluid, fluent way. There&#8217;s only sentences here, it&#8217;s just longer, richer, and more involved. There&#8217;s magical, programmatic banter happening here!</p>
<p>This style of object-oriented interface, where <em>method chaining</em> and <em>thoughtful return values</em> enable a pseudo-domain specific language written entirely in a general purpose language, has been called a <a href="http://martinfowler.com/bliki/FluentInterface.html" onclick="javascript:pageTracker._trackPageview ('/outbound/martinfowler.com');">&#8220;Fluent Interface&#8221; by Martin Fowler and Eric Evans</a>. It&#8217;s an inspiring departure from the days of the void, black hole methods like setters.</p>
<p>So, next time you&#8217;re writing an interface for some new class, or sitting at a bar wondering how best to approach that attractive member of the opposite sex, avoid muted methods at all costs. They&#8217;re black holes. They&#8217;re just awkward, feedbackless, and overall uncomfortable for everyone involved.</p>
<p>When your functions or methods don&#8217;t return ask yourself &#8220;if I <em>were </em>to return something here <em>what </em>would be useful?&#8221; Most often, it&#8217;s a reference to the object itself. Or an immutable clone.</p>
<p>&#8220;Oh, god no, not an immutable clone! I thought this article was about bar game?&#8221; Hmm&#8230; you&#8217;re right. I&#8217;ll save the immutable clone wars for another post. <a href="http://feeds.feedburner.com/KrisJordan" onclick="javascript:pageTracker._trackPageview ('/outbound/feeds.feedburner.com');">You should subscribe to this RSS feed if immutable clones pique your interest. Or nerdy bar game.</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 291px; width: 1px; height: 1px;">setDrink($this-&gt;buyDrink(&#8217;Vodka Redbull&#8217;));</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KrisJordan?a=pZKKhibmzTQ:yFNdf8MhBXA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KrisJordan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisJordan?a=pZKKhibmzTQ:yFNdf8MhBXA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KrisJordan?i=pZKKhibmzTQ:yFNdf8MhBXA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisJordan?a=pZKKhibmzTQ:yFNdf8MhBXA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/KrisJordan?i=pZKKhibmzTQ:yFNdf8MhBXA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisJordan?a=pZKKhibmzTQ:yFNdf8MhBXA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KrisJordan?i=pZKKhibmzTQ:yFNdf8MhBXA:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2009/08/24/on-muted-methods-and-fluent-interfaces/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2009/08/24/on-muted-methods-and-fluent-interfaces/</feedburner:origLink></item>
		<item>
		<title>What’s on my mind…</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/8cjtqeg7wcA/</link>
		<comments>http://www.krisjordan.com/2009/08/20/whats-on-my-mind/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 02:39:50 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Recess]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[new media campaigns]]></category>
		<category><![CDATA[software engineering]]></category>
		<category><![CDATA[virtual machines]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=590</guid>
		<description><![CDATA[In an hour I&#8217;ll be out doing late night trivia in a bar in Chapel Hill, North Carolina. Pop trivia has never been something I excel at, but with the right company it&#8217;s fun to wager a guess, or two, and let go of the problems that consume idle cycles. As of late my thought [...]]]></description>
			<content:encoded><![CDATA[<p>In an hour I&#8217;ll be out doing late night trivia in a bar in Chapel Hill, North Carolina. Pop trivia has never been something I excel at, but with the right company it&#8217;s fun to wager a guess, or two, and let go of the problems that consume idle cycles. As of late my thought has been switching between any of the following:</p>
<ul>
<li><a href="http://www.newmediacampaigns.com/page/the-throw-away-computer-virtualization" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">Using virtual machines and shell scripts to achieve the Ultimate Small Team Software Engineering Environment</a> &#8482;</li>
<li>Real Software Engineering in PHP</li>
<li>Trees, Recursion, Permissions, and Architecture of <a href="http://www.newmediacampaigns.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">my company</a>&#8217;s next <a href="http://www.newmediacampaigns.com/page/content-management-system" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">Content Management System</a></li>
<li>How to simplify internals and increase functionality of the Recess Framework by leveraging PHP 5.3&#8217;s new features like <a href="http://www.recessframework.org/page/functional-php-anonymous-functions-lambdas-closures" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.org');">anonymous functions</a> and <a href="http://www.newmediacampaigns.com/page/php-namespaces-backslash-example" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">namespaces</a></li>
<li>A big client integration project that deals with scary acronyms like HIPAA</li>
</ul>
<p>This space should be more lively than the ghosttown that it has become over the last 8 months. More off the cuff writing on the topic of the hour than the more structured pieces I&#8217;ve been writing for <a href="http://www.newmediacampaigns.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">New Media</a>&#8217;s <a href="http://www.newmediacampaigns.com/blog/category/Development" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">Web Development Blog</a> or the Recess <a href="http://www.recessframework.org/blog" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.org');">PHP Blog</a>.</p>
<p>To kick that off the off the cuff writing, <a href="http://ejohn.org/blog/eulogy-to-_why/" onclick="javascript:pageTracker._trackPageview ('/outbound/ejohn.org');">a few words on _why</a>. I don&#8217;t know _why, I haven&#8217;t read the <a href="http://www.ember.co.nz/files/resources/whys-poignant-guide-to-ruby.pdf" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ember.co.nz');">poignant guide</a> to Ruby (although I&#8217;ve come across it a number of occasions and been intrigued), nor have I used much of his huge body of open source work. None the less his recent disappearance has been sitting really funny on my stomach. Really funny. This guy is prolithic, talented, and obsessed with teaching the art and joy of programming. I didn&#8217;t fully appreciate _why until watching <a href="http://www.vimeo.com/5047563?pg=embed&amp;sec=" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vimeo.com');">his recent talk at Carnegie Melon</a> [embedded below]. His excitement and creative knack for opening programming up to a younger audience is energizing. Here&#8217;s to hoping an even brighter chapter to that story is about to unfold&#8230;</p>
<p><object width="400" height="220" data="http://vimeo.com/moogaloop.swf?clip_id=5047563&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=5047563&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KrisJordan?a=8cjtqeg7wcA:S209e1rDieE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KrisJordan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisJordan?a=8cjtqeg7wcA:S209e1rDieE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KrisJordan?i=8cjtqeg7wcA:S209e1rDieE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisJordan?a=8cjtqeg7wcA:S209e1rDieE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/KrisJordan?i=8cjtqeg7wcA:S209e1rDieE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisJordan?a=8cjtqeg7wcA:S209e1rDieE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KrisJordan?i=8cjtqeg7wcA:S209e1rDieE:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2009/08/20/whats-on-my-mind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2009/08/20/whats-on-my-mind/</feedburner:origLink></item>
		<item>
		<title>Recess! Framework Screencast #1</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/cMgCHmdNr30/</link>
		<comments>http://www.krisjordan.com/2008/12/16/recess-framework-screencast-1/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 03:34:44 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Recess Framework]]></category>
		<category><![CDATA[Recess]]></category>
		<category><![CDATA[screencast]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=574</guid>
		<description><![CDATA[I&#8217;m excited to get the first Recess! screencast out on the interwebs over at RecessFramework.org. Special thanks to Joel Sutherland and the Raleigh Web Design firm New Media Campaigns for helping me launch the Recess site in record time!
Without further adieu&#8230; Routing in Recess!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited to get the first Recess! screencast out on the interwebs over at <a href="http://www.recessframework.org" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.org');">RecessFramework.org</a>. Special thanks to <a href="http://www.twitter.com/JoelSutherland" onclick="javascript:pageTracker._trackPageview ('/outbound/www.twitter.com');">Joel Sutherland</a> and the <a href="http://www.newmediacampaigns.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">Raleigh Web Design</a> firm <a href="http://www.newmediacampaigns.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">New Media Campaigns</a> for helping me launch the Recess site in record time!</p>
<p>Without further adieu&#8230; <a href="http://www.recessframework.org/page/routing-in-recess-screencast" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.org');">Routing in Recess</a>!</p>
<div id="attachment_575" class="wp-caption alignnone" style="width: 410px"><a href="http://www.recessframework.org/page/routing-in-recess-screencast" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.org');"><img class="size-full wp-image-575" title="Recess! Framework" src="http://www.krisjordan.com/wp-content/uploads/2008/12/recesshomepage.gif" alt="Recess! PHP Framework" width="400" height="249" /></a><p class="wp-caption-text">Recess! PHP Framework</p></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=XZfdFUcz"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=7B32q5bO"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=7B32q5bO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=Myp0vAx1"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=Myp0vAx1" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=QlGR4TCv"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=QlGR4TCv" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/12/16/recess-framework-screencast-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/12/16/recess-framework-screencast-1/</feedburner:origLink></item>
		<item>
		<title>Towards RESTful PHP – 5 Basic Tips</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/2E2MqynU79g/</link>
		<comments>http://www.krisjordan.com/2008/12/02/towards-restful-php-5-basic-tips/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 06:33:57 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=482</guid>
		<description><![CDATA[What is REST?
REST is an architectural style, or set of conventions, for web applications and services that centers itself around resource manipulation and the HTTP spec. Web apps have traditionally ignored the HTTP spec and moved forward using a subset of the protocol: GET and POST,  200 OKs and 404 NOT FOUNDs.  As [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is REST?</strong><br />
REST is an architectural style, or set of conventions, for web applications and services that centers itself around <em>resource manipulation</em> and the HTTP spec. Web apps have traditionally ignored the HTTP spec and moved forward using a subset of the protocol: GET and POST,  200 OKs and 404 NOT FOUNDs.  As we entered a programmable web of applications with APIs the decision to ignore HTTP gave us problems we&#8217;re still dealing with today. We have an internet full of applications with different interfaces (GET /user/1/delete vs. POST /user/delete {id=1}). With REST we can say <em>/user/1 is a resource</em> and use the HTTP DELETE verb to delete it. For more detail on REST check out <a href="http://en.wikipedia.org/wiki/REST" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">wikipedia</a> and &#8220;<a href="http://www.megginson.com/blogs/quoderat/2007/02/15/rest-the-quick-pitch/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.megginson.com');">quick pitch</a>&#8220;.</p>
<h2>Tip #1: Using PUT and DELETE methods</h2>
<p>In PHP you can determine which HTTP method was used with: $_SERVER['REQUEST_METHOD']; From web browsers this will be either GET or POST. For RESTful clients applications need to support PUT and DELETE (and ideally OPTIONS, etc.) as well. Unfortunately PHP doesn&#8217;t have $_PUT and $_DELETE variables like it does $_POST and $_GET. Here&#8217;s how to access the content of a PUT request in PHP:</p>
<pre class="php" name="code">$_PUT  = array();
if($_SERVER['REQUEST_METHOD'] == 'PUT') {
    $putdata = file_get_contents('php://input');
    $exploded = explode('&amp;', $putdata); 

    foreach($exploded as $pair) {
        $item = explode('=', $pair);
        if(count($item) == 2) {
            $_PUT[urldecode($item[0])] = urldecode($item[1]);
        }
    }
}</pre>
<h2>Tip #2: Send Custom HTTP/1.1 Headers</h2>
<p>PHP&#8217;s <a href="http://www.php.net/header" onclick="javascript:pageTracker._trackPageview ('/outbound/www.php.net');">header</a> function allows custom HTTP headers to be sent to the client. The HTTP/1.x header contains the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.w3.org');">response code</a> from the server. PHP will, by default, send back a 200 OK status code which suggests that the request has succeeded even if it has die()&#8217;ed or a new resource has been created. There are two ways to change the status code of your response:</p>
<pre class="php" name="code">header('HTTP/1.1 404 Not Found');
/* OR */
header('Location: http://www.foo.com/bar', true, 201); // 201 CREATED</pre>
<p>The first line is a generic way of setting the response status code. If your response requires another header, like the Location header to the resource of a &#8216;201 Created&#8217; or &#8216;301 Moved Permanently&#8217;, placing the integer status code in the third parameter of header is a shortcut. It is the logical equivalent of the following example, which is easier to read at the cost of being an extra line of code.</p>
<pre class="php" name="code">header('HTTP/1.1 201 Created');
header('Location: http://www.foo.com/bar');</pre>
<h2>Tip #3: Send Meaningful HTTP Headers</h2>
<p>Policy for deciding when it is appropriate to send each HTTP status code is a full post on its own and the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.w3.org');">HTTP spec</a> leaves room for ambiguity. There are <a href="http://www.xml.com/pub/a/2004/12/01/restful-web.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.xml.com');">many</a> <a href="http://blog.brianguthrie.com/articles/2008/08/22/rails-and-rest-a-reference-to-commonly-used-http-status-codes-and-their-use-in-rest-apis" onclick="javascript:pageTracker._trackPageview ('/outbound/blog.brianguthrie.com');">other</a> resources on the net which provide insights so I&#8217;ll just touch on a few.</p>
<p><strong>201 Created</strong> is used when a new resource has been created. It should include a Location header which specifies the URL for the resource (i.e. books/1). The inclusion of a location header does not automatically forward the client to the resource, rather, 201 Created responses should include an entity (message body) which lists the location of the resource.</p>
<p><strong>202 Accepted</strong> allows the server to tell the client &#8220;yeah, we heard your order, we&#8217;ll get to it soon.&#8221; Think the <a href="http://www.twitter.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.twitter.com');">Twitter API</a> on a busy day. Where 201 Created implies the resource has been created before a response returns, 202 Accepted implies the request is ok and in a queue somewhere.</p>
<p><strong>304 Not Modified</strong> in conjunction with caching and conditional GET requests (requests with If-Modified-Since / If-None-Match headers) allows web applications to say &#8220;the content hasn&#8217;t changed, continue using the cached version&#8221; without having to re-render and send the cached content down the pipe.</p>
<p><strong>401 Unauthorized</strong> should be used when attempting to access a resource which requires authentication credentials the request does not carry. This is used in conjunction with www-authentication.</p>
<p><strong>500 Internal Server Error</strong> is better than OK when your PHP script dies or reaches an exception.</p>
<p>In the <a href="http://www.recessframework.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">Recess! Framework</a> I use this <a href="http://www.krisjordan.com/php-class-for-http-response-status-codes/">StatusCodes class</a> to provide named constants for all HTTP/1.1 status codes. Example usage:</p>
<pre class="php" name="code">header(StatusCodes::httpHeaderFor(StatusCodes::HTTP_NOT_FOUND));</pre>
<h2>Tip #4: Don&#8217;t Use $_SESSION</h2>
<p>A truly RESTful PHP application should be entirely stateless- <strong>all requests should contain enough information to be handled without additional server side state</strong>. In practice this means storing authentication information in a cookie with a timestamp and a checksum. Additional data can also be stored in a cookie. In the event you need more than a cookie&#8217;s worth of data fall back to storing it in a central database with the authentication still in the cookie. <a href="http://www.krisjordan.com/2008/09/16/cal-henderson-scalable-web-architectures-common-patterns-and-approaches/">This is how Flickr approaches statelessness.</a></p>
<h2>Tip #5: Test with cURL or rest-client</h2>
<p><a href="http://www.krisjordan.com/wp-content/uploads/2008/12/rest-client.png"><img class="alignright size-thumbnail wp-image-494" title="rest-client" src="http://www.krisjordan.com/wp-content/uploads/2008/12/rest-client-150x150.png" alt="" width="150" height="150" /></a><a href="http://curl.haxx.se/" onclick="javascript:pageTracker._trackPageview ('/outbound/curl.haxx.se');">cURL</a> makes it easy to execute any HTTP METHOD on a resource URL. You can pass request parameters and headers as well as inspect response headers and data. The command line tool &#8216;curl&#8217; is standard on many *nix distros. Windows users should check out <a href="http://www.mingw.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.mingw.org');">MinGW/MSYS</a> which supports cURL. Even <a href="http://us2.php.net/curl" onclick="javascript:pageTracker._trackPageview ('/outbound/us2.php.net');">PHP has cURL functions</a> which are enabled on most hosts (<a href="http://us2.php.net/manual/en/curl.setup.php" onclick="javascript:pageTracker._trackPageview ('/outbound/us2.php.net');">php/curl install page</a>).</p>
<p><strong>cURL Example Usage &amp; Common Parameters:</strong></p>
<pre># curl -X PUT http://www.foo.com/bar/1 -d "some=var" -d "other=var2" -H "Accept: text/json" -I</pre>
<p><strong>-X [METHOD]</strong> Specify the HTTP method.<br />
<strong>-d &#8220;name=value&#8221;</strong> Set a POST/PUT field name and value.<br />
<strong>-H [HEADER]</strong> Set a header.<br />
<strong>-I</strong> Only display response&#8217;s headers.</p>
<p>Alternatively, a free GUI to test REST interfaces is <a href="http://code.google.com/p/rest-client/" onclick="javascript:pageTracker._trackPageview ('/outbound/code.google.com');">Java/Swing based <strong>rest-client</strong></a>. rest-client is scriptable and has support for JSON/XML.</p>
<h2>Tip #6 &#8211; Use a RESTful PHP Framework</h2>
<p>Frankly, developers shouldn&#8217;t have to worry about many of these low-level details of REST when writing PHP apps. REST is based on conventions and conventions, by nature, involve a lot of boilerplate. This is right up a framework&#8217;s alley (as Rails has shown). What options exist for PHP? CodeIgniter&#8217;s routing completely ignores the HTTP METHOD so there is <a href="http://blog.medryx.org/2008/10/03/codeigniter-rest/" onclick="javascript:pageTracker._trackPageview ('/outbound/blog.medryx.org');">serious hacking</a> that needs to be done. Cake <a href="http://book.cakephp.org/view/478/Custom-REST-Routing" onclick="javascript:pageTracker._trackPageview ('/outbound/book.cakephp.org');">has</a> REST support but wasn&#8217;t designed to make specifying useful response status codes a part of the framework. <a href="http://konstrukt.dk/" onclick="javascript:pageTracker._trackPageview ('/outbound/konstrukt.dk');">Konstruct</a> appears to have a very well thought out architecture for a controllers framework built around HTTP and REST. Unfortunately it is not easily approached and lacking (intentionally) many components, like an ORM layer, developers have come to expect in a modern web framework.</p>
<p>(Disclaimer: <em>Shameless Plug!</em>) <strong>The lack of a solid, RESTful PHP framework was one of my primary motivations for creating the <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">Recess! Framework</a></strong>. Recess is a full-stack, open source (MIT), <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">RESTful PHP framework</a>. If you&#8217;re interested in writing RESTful PHP applications check it out and sign-up to be notified of its upcoming release.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=zXe4wsOb"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=DsR4w42o"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=DsR4w42o" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=vVnGv31I"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=vVnGv31I" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=2UbVPIVl"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=2UbVPIVl" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/12/02/towards-restful-php-5-basic-tips/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/12/02/towards-restful-php-5-basic-tips/</feedburner:origLink></item>
		<item>
		<title>How Recess Solves Common PHP/MySQL Issues</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/vo7c7WP12ok/</link>
		<comments>http://www.krisjordan.com/2008/11/28/how-recess-solves-common-phpmysql-issues/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:25:25 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Recess Framework]]></category>
		<category><![CDATA[data access]]></category>
		<category><![CDATA[layering]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=474</guid>
		<description><![CDATA[Justin Carmony wrote a great article titled &#8216;PHP Design &#8211; Biggest Database Oversights&#8216;. The article points out 5 naive PHP/MySQL design decisions that will come back to haunt projects if they&#8217;ve been made. As I&#8217;m getting closer to the public preview release of the Recess! Framework this article discusses how Recess! addresses some of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.justincarmony.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.justincarmony.com');">Justin Carmony</a> wrote a great article titled &#8216;<a href="http://www.justincarmony.com/blog/2008/10/25/php-design-biggest-database-oversights/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.justincarmony.com');">PHP Design &#8211; Biggest Database Oversights</a>&#8216;. The article points out 5 naive PHP/MySQL design decisions that will come back to haunt projects if they&#8217;ve been made. As I&#8217;m getting closer to the public preview release of the <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">Recess! Framework</a> this article discusses how Recess! addresses some of the most common oversights in database development.</p>
<p><strong>Re: Oversight #1 &#8211; No Data Access Layer</strong></p>
<p>Quality software design and engineering is all about abstracting away details and finding the proper layers of functionality. As Justin points out, if there is no layer of abstraction which wraps data access code then low-level data access code will appear everywhere. PHP projects which interleave data connections and queries throughout their code are difficult to maintain. </p>
<p>The database stack in Recess! has four major components: 1) SQL statement builder, 2) Data Sources, 3) Data Sets, 4) Object-Relational Mapped Models. The notion of a &#8216;data access layer&#8217; is taken care of by Data Sources. Data sources wrap properly around PDO and introduce new methods beyond PDO&#8217;s, for example: getTables and getColumns($table). The implementation of these methods is specific to the RDBMS so Recess! also has the notion of a vendor specific driver called a DataSourceProvider. Currently Sqlite and MySql are supported.</p>
<p><strong>Re: Oversight #2 &#8211; Design for Only One Database Connection</strong></p>
<p>Small, greenfield projects often start out with a single database. This leads to naive data access layers which only support connections to a single database. Recess! supports multiple, named Data Sources. Instead of using a singleton pattern it uses a registry to store the Data Sources by name.</p>
<p>Having named Data Sources in an application gets really powerful at higher layers of abstraction, such as at the ORM layer, where we can mark-up a model with a single annotation to define which Data Source the model is persisted in.</p>
<p><strong>Re: Oversight #3 &#8211; No Developer Logging</strong></p>
<p>This isn&#8217;t as fully fleshed out yet as I&#8217;d like but the plans and hooks are in place to be able to log queries, their stack traces, as well as their EXPLAIN&#8217;ed strategies for execution in the RDBMS.  In Recess! there is a distinct difference between Development mode and Production mode. Sql logging will be a toggle option on by default in development and off by default in production.</p>
<p><strong>Re: Oversight #4 &#8211; Queries Written in Procedural Processes</strong></p>
<p>My dislike of queries being written in procedural code may run even deeper than Justin&#8217;s! Recess! abdicates SQL string manipulation to a low-level SqlBuilder class. An instance of SqlBuilder allows SQL query strings to be built incrementally using chained method calls. Let&#8217;s take a look at some examples:</p>
<pre name="code" class="php">
$sqlBuilder = new SqlBuilder();
$sql = $sqlBuilder
            -&gt;from('people')
            -&gt;like('name','Kris')
            -&gt;orderBy('age')
            ->toSql();
// $sql is now:
// 'SELECT people.*
//    WHERE people.name = :people_name
//    ORDER BY people.age
$args = $sqlBuilder-&gt;getPdoArguments();
// $args is now array( 'people_name' =&gt; 'Kris' );

// Let's add another criterion
$sql = $sqlBuilder->equal('home_city', 'Charlotte')->toSql();
// $sql is now:
//  SELECT people.*
//      WHERE people.name LIKE :people_name
//      AND people.home_city = :people_home_city
//      ORDER BY people.age

$args = $sqlBuilder-&gt;getPdoArguments();
// $args is now array(
//                   'people_name' =&gt; 'Kris',
//                   'people_home_city' =&gt; 'Charlotte' );
</pre>
<p>SqlBuilder can do more complex things like joins, as well as inserts, updates, and deletes. Recess! users, though, will likely never use SqlBuilder because it&#8217;s still too low level of an abstraction. Internally, however, having the ability to incrementally construct query strings has made the framework code quite pretty.</p>
<p>Here&#8217;s code at the level of abstraction Recess! developers can expect to write:</p>
<pre name="code" class="php">
class Person extends Model { }
$person = new Person();
$person-&gt;name = 'Kris';
$person-&gt;homeCity = 'Charlotte';
$people = $person-&gt;find()-&gt;orderBy('name');
foreach($people as $person) {
   echo $person-&gt;name, ' ', $person-&gt;age, '&lt;br /&gt;';
}
</pre>
<p>This example just scrapes the surface of Recess! object-relational mapping. Relationships, CRUDS, cascading deletes, etc. are all handled as well. In a future post I&#8217;ll step through the data access stack&#8217;s capabilities in more detail. Needless to say, in Recess! queries won&#8217;t be mixed with procedural code!</p>
<p><strong>Re: Oversight #5 &#8211; No Separation of Reads and Writes</strong></p>
<p>Once projects outgrow a single server RDBMS the next step is often to do a Master/Slave setup in MySQL. In a Master/Slave setup expensive and less frequent writes are channeled to the Master server while reads are channeled to the Slave server.</p>
<p>In Recess!, by using named data sources as described in #2, we can handle Data Sources on a per model basis. A natural extension of this is handling reads and writes independently on a per model basis. The pseudo-code below shows how this may look on a model:</p>
<pre name="code" class="php">
/**
 * !Source master, For: Writes
 * !Source (slave1, slave2, slave3), For: Reads
 * !HasMany books
 */
class Person extends Model {}

/**
 * !Source master
 * !BelongsTo person
 */
class Books extends Model {}
</pre>
<p>In a future post I&#8217;ll describe the Recess! annotations system which will explain the constructs you&#8217;re seeing in the DocComments. Recess! annotations give us a way of providing static metadata about a class and are built-in to the framework&#8217;s core. Recess! annotations should be familiar to Java and .Net programmers who have used annotations.</p>
<p><strong>Conclusion</strong></p>
<p>So that&#8217;s a quick look at how Recess! handles Justin Carmony&#8217;s commonly made MySQL/PHP mistakes. These issues are abstracted away in the internals of Recess. If you&#8217;re a PHP developer check out <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">RecessFramework.com</a> and sign-up to be notified when it is publicly released &#8220;very soon now&#8221;.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=xewAwnEf"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=G2Tf3lMN"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=G2Tf3lMN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=axC0q32k"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=axC0q32k" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=TXTYbtRi"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=TXTYbtRi" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/11/28/how-recess-solves-common-phpmysql-issues/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/11/28/how-recess-solves-common-phpmysql-issues/</feedburner:origLink></item>
		<item>
		<title>Dynamic Properties in PHP and StdClass</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/n_dXs2NgqLQ/</link>
		<comments>http://www.krisjordan.com/2008/11/27/dynamic-properties-in-php-with-stdclass/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 05:49:15 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[dynamic properties]]></category>
		<category><![CDATA[stdclass]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=451</guid>
		<description><![CDATA[Languages like JavaScript and Python allow object instances to have dynamic properties. As it turns out, PHP does too. Looking at the official PHP documentation on objects and classes you might be lead to believe dynamic instance properties require custom __get and __set magic methods. They don&#8217;t.
Simple, Built-in Dynamic Properties
Check out the following code listing:

class [...]]]></description>
			<content:encoded><![CDATA[<p>Languages like JavaScript and Python allow object instances to have dynamic properties. As it turns out, PHP does too. Looking at the official PHP documentation on objects and classes you might be lead to believe dynamic instance properties require custom __get and __set magic methods. They don&#8217;t.</p>
<h2>Simple, Built-in Dynamic Properties</h2>
<p>Check out the following code listing:</p>
<pre class="php" name="code">
class DynamicProperties { }
$object = new DynamicProperties;

print isset($object-&gt;foo) ? 't' : 'f'; // f

// Set Dynamic Properties foo and fooz
$object-&gt;foo = 'bar';
$object-&gt;fooz = 'baz';

// Isset and Unset work
isset($object-&gt;foo); // true
unset($object-&gt;foo); 

// Iterate through Properties and Values
foreach($object as $property =&gt; $value)  {
     print($property . ' = ' . $value . '&lt;br /&gt;');
}
// Prints:
//   fooz = baz</pre>
<p>
Using the built-in dynamic instance properties is an order of magnitude faster (30x, by my profiling) than using magic __get and __set methods. Built in dynamic property accesses happen without invoking a method call back to PHP script.</p>
<p>So when does it make sense to use __get and __set? If you need more complex behavior, like calculated properties, you must use __get and __set. Also, as an astute comment points out, if you would prefer <em>not</em> to have dynamic properties on a class you can throw errors from __get and __set.<br />
<h2>StdClass: Anonymous Objects</h2>
<p>Sometimes all that is necessary is a property bag to throw key value pairs into. One way is to use array, but this requires quoting all keys. Another way is to use dynamic properties on an instance of StdClass. StdClass is a sparsely documented class in PHP which has no predefined members.</p>
<pre name="code" class="php">
$object = new StdClass;
$object->foo = 'bar';
json_encode($object);
</pre>
<p>Next I&#8217;ll touch on the SPL&#8217;s Countable and ArrayAccess as a means of being able to accomplish the following in PHP:</p>
<pre class="php" name="code">
class MyClass implements Countable, ArrayAccess { ... }

$myObject = new MyClass();
// Using array access notation
$myObject[0] = 'hello';
$myObject[1] = 'world';
$myObject['foo'] = 'bar';
</pre>
<p><em>Thanks to the folks pointing out that you don&#8217;t need to extend from StdClass in order to have dynamic properties!</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=AE6AWf7K"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=6RxxHrdr"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=6RxxHrdr" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=ao1sDOTg"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=ao1sDOTg" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=MLSRTa3S"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=MLSRTa3S" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/11/27/dynamic-properties-in-php-with-stdclass/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/11/27/dynamic-properties-in-php-with-stdclass/</feedburner:origLink></item>
		<item>
		<title>How does the quality of political candidates’ websites correlate with campaign success?</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/v4qM51_kyrw/</link>
		<comments>http://www.krisjordan.com/2008/10/29/how-does-the-quality-of-political-candidates%e2%80%99-websites-correlate-with-campaign-success/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 21:11:41 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[political campaigns]]></category>
		<category><![CDATA[Recess Framework]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=445</guid>
		<description><![CDATA[VoteTheSite.com, a micro-site my good friends at New Media Campaigns have built, is conducting an on-line experiment to explore just that question. VoteTheSite.com pits congressional candidates’ websites against each other race-by-race. Races can be viewed randomly or by state. I was surprised by the range of quality congressional websites have. From top notch sites in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.votethesite.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">VoteTheSite.com</a>, a micro-site my good friends at <a href="http://www.newmediacampaigns.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">New Media Campaigns</a> have built, is conducting an on-line experiment to explore just that question. <a href="http://www.votethesite.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">VoteTheSite.com</a> pits congressional candidates’ websites against each other race-by-race. Races can be viewed <a href="http://www.votethesite.com/races/chance" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">randomly</a> or by <a href="http://www.votethesite.com/races" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">state</a>. I was surprised by the range of quality congressional websites have. From top notch sites in <a href="http://www.votethesite.com/races/show/168" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">Texas&#8217; 5th</a> to the really poor websites in <a href="http://www.votethesite.com/races/show/378" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">Georgia&#8217;s 1st</a> they run the quality gamut.</p>
<div id="attachment_446" class="wp-caption alignright" style="width: 310px"><a href="http://www.votethesite.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');"><img class="size-full wp-image-446" title="VoteTheSite.com" src="http://www.krisjordan.com/wp-content/uploads/2008/10/votethesite.jpg" alt="VoteTheSite.com - Vote on Political Websites" width="300" height="213" /></a><p class="wp-caption-text">VoteTheSite.com - Vote on Political Websites</p></div>
<p>After the elections have taken place the votes on websites will be tallied up and compared to election results. Should be really interesting to see what the outcome is and how strong website quality correlates with campaign success.</p>
<p>Within the first 24 hours over 5,000 votes have been cast. Congrats to the <a href="http://www.newmediacampaigns.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">New Media</a> team for getting this out the door so quickly (with a little help from the Mechanical Turk)! <a href="http://www.votethesite.com/races" onclick="javascript:pageTracker._trackPageview ('/outbound/www.votethesite.com');">Go vote on the websites in your state</a>…</p>
<p>VoteTheSite.com was written (in under 2 days!) on an early version of the PHP Framework, the <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">Recess! Framework</a>, I’ve had my head down plugging away on the past couple of weeks. Expect blog activity to pick up as the <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">Recess! Framework</a> moves closer to a public release. Sign up to be notified of the release at <a href="http://www.recessframework.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.recessframework.com');">RecessFramework.com</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=cZRqNxfg"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=jBNCrnLT"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=jBNCrnLT" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=H6Tiae0H"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=H6Tiae0H" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=BpXLaXwu"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=BpXLaXwu" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/10/29/how-does-the-quality-of-political-candidates%e2%80%99-websites-correlate-with-campaign-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/10/29/how-does-the-quality-of-political-candidates%e2%80%99-websites-correlate-with-campaign-success/</feedburner:origLink></item>
		<item>
		<title>Hello Again, Old Friend: Revisiting a PHP Framework</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/p7N1wbaL4gU/</link>
		<comments>http://www.krisjordan.com/2008/10/08/hello-again-old-friend-revisiting-a-php-framework/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 17:26:45 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[redesign]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=435</guid>
		<description><![CDATA[I&#8217;m in the process of replumbing the lightweight PHP application framework I wrote with Joel Sutherland over three years ago. Its original design was inspired by the Java Struts Framework. It enabled us to rapidly develop the first version of New Media Campaigns&#8216; website management software. Two summers ago we did a major redesign inspired [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of replumbing the lightweight PHP application framework I wrote with <a href="http://www.jsuth.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jsuth.com');">Joel Sutherland</a> over three years ago. Its original design was inspired by the <a href="http://struts.apache.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/struts.apache.org');">Java Struts Framework</a>. It enabled us to rapidly develop the first version of <a href="http://www.newmediacampaigns.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">New Media Campaigns</a>&#8216; <a href="http://www.newmediacampaigns.com/page/content-management" onclick="javascript:pageTracker._trackPageview ('/outbound/www.newmediacampaigns.com');">website management software</a>. Two summers ago we did a major redesign inspired by the <a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">DRY</a> nature of <a href="http://www.rubyonrails.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.rubyonrails.org');">Ruby on Rails</a>. Since then Joel and <a href="http://www.joshlockhart.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.joshlockhart.com');">Josh Lockhart</a> have been tweaking the framework by addressing the issues which crop up after their intensive use while rewriting New Media&#8217;s system. </p>
<p>Energized by <a href="http://www.krisjordan.com/live-blogging-from-web-20-expo-new-york/">what I saw at the Web 2.0 Expo</a> in NY I&#8217;m back at it again. My three big goals with this take:</p>
<p>1) <strong>Get it in the wild: Open source with an <a href="http://en.wikipedia.org/wiki/MIT_License" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">MIT license</a></strong>. This is going to happen before the New Year. Hopefully sooner. We intended to do this with V2. It actually <em>was </em>publicly available in 2006 for a brief period of time but without any real plan for evangelism. I&#8217;ve been using open source software for a long time and its high time to give back.</p>
<p>2) <strong>Play nice in the new RESTful world.</strong> If I had to bet on a paradigm for interacting with web APIs I would bet the farm on <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">REST</a>. It is perfectly aligned with the grain of the web. Most existing frameworks written without an emphasis on REST have made awkward face lifts to adapt. When revisiting our own framework and considering how to make it properly RESTful this would have held true if not for&#8230;</p>
<p>3) <strong>Signficantly </strong><strong>Improving the Architecture.</strong> Revisiting old code is a joy. It&#8217;s easy to forget how clever you were and how much work you did. Yet it&#8217;s very disturbing to realize how hacked some of the fundamental design was. As mentioned, the current version was influenced significantly by what Rails plumbing looked like circa-2006. Since then two really important things have changed: 1) the emphasis on tying closer to HTTP protocol, and 2) two additional years of experience with systems design under the belt.</p>
<p>So, <em>here&#8217;s to take 3</em>! Bits available for download in upcoming months. E-mail me at krisjordan/gmail if interested in being copied on barely functional, pre-release bits in the mean time. Otherwise, <a href="http://feeds.feedburner.com/KrisJordan/" onclick="javascript:pageTracker._trackPageview ('/outbound/feeds.feedburner.com');">stay tuned</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=BXqZalTi"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=nE77cQf2"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=nE77cQf2" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=YKoSPjej"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=YKoSPjej" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=Ts3VX0gw"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=Ts3VX0gw" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/10/08/hello-again-old-friend-revisiting-a-php-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/10/08/hello-again-old-friend-revisiting-a-php-framework/</feedburner:origLink></item>
		<item>
		<title>Brainstorming Ideas with Sharpies &amp; Sticky Notes</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/d5RVc0KBUp4/</link>
		<comments>http://www.krisjordan.com/2008/10/01/brainstorming-ideas-with-sharpies-sticky-notes/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 00:17:48 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[powerpoint]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[sharpies]]></category>
		<category><![CDATA[sticky notes]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=425</guid>
		<description><![CDATA[After getting a comment from Ric Bretschneider of Microsoft&#8217;s PowerPoint team I came across the book slide:ology on his site Presentations Roundtable.  I picked up slide:ology from a bookstore on my way out to New York and it is a great piece of work (and art!) authored by Nancy Duarte of Duarte Design. Duarte Design [...]]]></description>
			<content:encoded><![CDATA[<p>After getting a <a href="http://www.krisjordan.com/2008/09/07/10-minute-mock-prototyping-tips-for-powerpoint/">comment</a> from <a href="http://talk.presentationsroundtable.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/talk.presentationsroundtable.com');">Ric Bretschneider</a> of Microsoft&#8217;s <a href="http://blogs.msdn.com/powerpoint/archive/2008/09/14/one-more-special-intern.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/blogs.msdn.com');">PowerPoint team</a> I came across the book <a href="http://www.amazon.com/gp/product/0596522347?ie=UTF8&amp;tag=krijoronsofst-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596522347" onclick="javascript:pageTracker._trackPageview ('/outbound/www.amazon.com');">slide:ology</a> on his site <a href="http://talk.presentationsroundtable.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/talk.presentationsroundtable.com');">Presentations Roundtable</a>.  I picked up <a href="http://www.amazon.com/gp/product/0596522347?ie=UTF8&amp;tag=krijoronsofst-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596522347" onclick="javascript:pageTracker._trackPageview ('/outbound/www.amazon.com');">slide:ology</a> from a bookstore on my way out to New York and it is a great piece of work (and art!) authored by <a href="http://slideology.com/contributors/" onclick="javascript:pageTracker._trackPageview ('/outbound/slideology.com');">Nancy Duarte</a> of <a href="http://www.duarte.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.duarte.com');">Duarte Design</a>. Duarte Design is the firm behind Al Gore&#8217;s &#8220;An Inconvenient Truth&#8221; <a href="http://www.duarte.com/#1.0.0" onclick="javascript:pageTracker._trackPageview ('/outbound/www.duarte.com');">Keynote slide deck</a>. They are also the designers of <a href="http://www.ted.com/index.php/talks/john_doerr_sees_salvation_and_profit_in_greentech.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ted.com');">John Doerr&#8217;s TED talk</a>&#8217;s deck. Duarte Design is truly first class.</p>
<div id="attachment_426" class="wp-caption alignright" style="width: 115px"><a href="http://www.krisjordan.com/wp-content/uploads/2008/10/stickynotesexcerpt.jpg"><img class="size-thumbnail wp-image-426" title="Innovating with Sticky Notes" src="http://www.krisjordan.com/wp-content/uploads/2008/10/stickynotesexcerpt-150x150.jpg" alt="Innovating with Sticky Notes" width="105" height="105" /></a><p class="wp-caption-text">Innovating with Sticky Notes (Excerpt)</p></div>
<p>A technique that caught my eye was &#8220;Innovating with Sticky Notes&#8221; (p28). The premise is to use a sharpie and generate ideas on sticky notes. One idea per sticky note (the bonus of using a sharpie is that is about all you can fit). Just unleash as many ideas as possible and get them up on the wall. Structure and flow can then be orchestrated by rearranging the notes.</p>
<div id="attachment_427" class="wp-caption alignleft" style="width: 115px"><a href="http://www.krisjordan.com/wp-content/uploads/2008/10/stickynotes.jpg"><img class="size-thumbnail wp-image-427" title="stickynotes" src="http://www.krisjordan.com/wp-content/uploads/2008/10/stickynotes-150x150.jpg" alt="Idea Notes for Chord Talk" width="105" height="105" /></a><p class="wp-caption-text">Idea Notes for Chord Talk</p></div>
<p>I decided to give the sticky note method a shot with a talk I&#8217;m giving on the <a href="http://en.wikipedia.org/wiki/Chord_project" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Chord Protocol</a> in a <a href="http://www.cs.unc.edu/~dewan/290/f08/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.cs.unc.edu');">graduate class</a> I&#8217;m auditing at UNC. I must admit I really liked the technique after trying it out. It&#8217;s quick and dirty and prevented me from getting lost in details and aesthetics. My focus remained on the big ideas and overall message I wanted to &#8216;teach&#8217;. I would even go so far as to say that it&#8217;s <em>fun</em>. Once I&#8217;m done with the talk I&#8217;ll narrate a slideshow and throw it up on here so you can see the end result.</p>
<p>This sharpie + sticky notes method is only a detail in the grand thesis of Nancy Duarte&#8217;s <a href="http://slideology.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/slideology.com');">slide:ology</a>. Spend some quality time with <a href="http://www.amazon.com/gp/product/0596522347?ie=UTF8&amp;amp;tag=krijoronsofst-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0596522347" onclick="javascript:pageTracker._trackPageview ('/outbound/www.amazon.com');">this book</a> before you prepare your next presentation, you won&#8217;t regret it.</p>
<p><em>Aside: if you&#8217;re going to use this technique on a wall at a coffee shop be prepared for inquisitive looks! <img src='http://www.krisjordan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=E8a8I23u"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=WElgGhkM"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=WElgGhkM" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=e2kiuRbF"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=e2kiuRbF" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=VeFZQcug"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=VeFZQcug" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/10/01/brainstorming-ideas-with-sharpies-sticky-notes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/10/01/brainstorming-ideas-with-sharpies-sticky-notes/</feedburner:origLink></item>
		<item>
		<title>10 High Order Bits from the Web 2.0 Expo in NY</title>
		<link>http://feedproxy.google.com/~r/KrisJordan/~3/o7MuEJFFkjE/</link>
		<comments>http://www.krisjordan.com/2008/09/25/10-high-order-bits-from-the-web-20-expo-in-ny/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 22:41:09 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Web 2.0 Expo NY]]></category>
		<category><![CDATA[adelson]]></category>
		<category><![CDATA[cal]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[filter failure]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[fried]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[huffington]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[vaynerchuk]]></category>
		<category><![CDATA[web2expoNY]]></category>

		<guid isPermaLink="false">http://www.krisjordan.com/?p=373</guid>
		<description><![CDATA[
10. Your Web App: Give it a REST
David Heinemier Hansson&#8217;s session about making Ruby on Rails RESTful cast this battle as an epic one between the REST Rebels and the Imperial WS-* Death Star. It&#8217;s going to be a tough fight but you know who&#8217;s gonna win.
REST (Representational State Transfer) is the elegant architecture and [...]]]></description>
			<content:encoded><![CDATA[<h3><a href="http://www.krisjordan.com/2008/09/17/david-heinemeier-hansson-go-rest-with-rails/"><img class="alignright size-thumbnail wp-image-223" title="WS - Deathstar" src="http://www.krisjordan.com/wp-content/uploads/2008/09/ws-deathstar-150x150.jpg" alt="" width="105" height="105" /></a></h3>
<h2>10. <a href="http://www.krisjordan.com/2008/09/17/david-heinemeier-hansson-go-rest-with-rails/">Your Web App: Give it a REST</a></h2>
<p><a href="http://www.krisjordan.com/2008/09/17/david-heinemeier-hansson-go-rest-with-rails/" target="_blank">David Heinemier Hansson&#8217;s session</a> about making <a href="http://www.rubyonrails.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.rubyonrails.org');">Ruby on Rails</a> RESTful cast this battle as an epic one between the REST Rebels and the Imperial <strong>WS-*</strong> Death Star. It&#8217;s going to be a tough fight but you know who&#8217;s gonna win.</p>
<p>REST (<a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Representational State Transfer</a>) is the elegant architecture and set of conventions first presented in <a href="http://en.wikipedia.org/wiki/Roy_Fielding" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Roy Fielding</a>&#8217;s PhD dissertation &#8220;<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ics.uci.edu');">Architectural Styles and the Design of Network-based Software Architectures</a>&#8220;. It is well aligned with the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.w3.org');">HTTP protocol</a> and much simpler to implement and use than SOAP, XMLRPC, etc.</p>
<p>Implementing RESTful APIs in web applications is getting really easy with leading frameworks like <a href="http://www.rubyonrails.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.rubyonrails.org');">Rails</a> and Cake supporting REST as a first-class citizen. The <a href="http://en.wikipedia.org/wiki/Atom_(standard)" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Atom format</a> is leading the charge as a RESTful format supported by the big players: Google, <a href="http://www.infoq.com/news/2008/03/microsoft-atompub" onclick="javascript:pageTracker._trackPageview ('/outbound/www.infoq.com');">Microsoft</a>, Yahoo, Twitter, etc.</p>
<h3><a href="http://www.krisjordan.com/2008/09/18/clay-shirky-keynote/"><img class="alignright size-thumbnail wp-image-289" title="Clay" src="http://www.krisjordan.com/wp-content/uploads/2008/09/shirky-150x150.jpg" alt="" width="105" height="105" /></a></h3>
<h2>9. <a href="http://www.krisjordan.com/2008/09/18/clay-shirky-keynote/">&#8220;It’s Not Information Overload, It’s Filter Failure&#8221; </a></h2>
<p><a href="http://en.wikipedia.org/wiki/Clay_Shirky" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Clay Shirky&#8217;s talk</a> states that since the invention of the printing press humans have always faced information overload. We have been surrounded by more information than we can consume in an entire lifetime for centuries. The problem is not information over load, it&#8217;s filter failure. We need better filters.</p>
<p><a href="http://en.wikipedia.org/wiki/Jay_Adelson" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Jay Adelson</a> of <a href="http://www.digg.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.digg.com');">Digg</a> believes building better filters is exactly the mission Digg and other players in the collaborative filter space are addressing.</p>
<h2><img class="alignright size-thumbnail wp-image-382" title="iPhone GPS" src="http://www.krisjordan.com/wp-content/uploads/2008/09/iphone-map-150x150.jpg" alt="" width="105" height="105" />8. <a href="http://www.krisjordan.com/2008/09/18/andrew-turner-mikel-maron-trends-and-technologies-in-where-20/">Sensor Driven Data: The Web is Getting Orwellian</a></h2>
<p>With Apple putting GPS in iPhones, Google putting GPS in Android, Nikon putting GPS in the Coolpix P6000, and &#8230; you get the point. GPS, motion sensors, video recorders, microphones, and other sensors are increasingly distributed and surrounding us.</p>
<p>Tim O’Reilly believes a BIG revolution is happening Here. Tim is really bullish on sensor driven data. <a href="http://en.oreilly.com/where2008/public/content/home" onclick="javascript:pageTracker._trackPageview ('/outbound/en.oreilly.com');">Where 2.0 has its own O&#8217;Reilly Conference</a>. This space is heating up fast.</p>
<h3><a href="http://www.jquery.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jquery.com');"><img class="alignright size-thumbnail wp-image-378" title="jQuery" src="http://www.krisjordan.com/wp-content/uploads/2008/09/jquery_logo-150x53.gif" alt="" width="105" height="37" /></a></h3>
<h2>7. <a href="http://www.jquery.com" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jquery.com');">Javascript is Bringing Sexy Back to the Browser</a></h2>
<p>John Resig gave a session on <a href="http://www.krisjordan.com/2008/09/17/john-resig-building-a-visualization-language/">processing.js</a>, his visualization engine running atop the HTML5 Canvas. The canvas has really low level functionality, a la OpenGL for 2-D surfaces, but with the right libraries in place it can lead to some truly impressive results. Flickr&#8217;s Paul Hammond gave perhaps the most compelling story of the use of Javascript and Canvas. After building Flickr Stats, using Canvas for graph visualizations, a team member loaded a page on an iPhone. It just flat out worked.</p>
<p>Unfortunately my friends over at Microsoft are slowing down the progress here with no planned support for the HTML5 Canvas in IE8. Google&#8217;s <a href="http://excanvas.sourceforge.net/" onclick="javascript:pageTracker._trackPageview ('/outbound/excanvas.sourceforge.net');">excanvas</a> gets around this for IE users by mapping to VML. Unfortunately excanvas currently only works in quirks mode in IE8. <em>Damnit Microsoft</em>, you&#8217;ve brought IE8 a long ways towards being a modern, friendly player on the web, why not support Canvas? <em>Come on Oz, come on.</em></p>
<h3><a href="http://dataportability.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/dataportability.org');"><img class="alignright size-thumbnail wp-image-313" title="Data Portability" src="http://www.krisjordan.com/wp-content/uploads/2008/09/data-portability-150x150.jpg" alt="" width="96" height="96" /></a></h3>
<h2>6. <a href="http://www.krisjordan.com/2008/09/19/joseph-smarr-tying-it-all-together-implementing-the-open-web/" target="_self">The Open Web is Nearing the Tipping Point</a></h2>
<p><a href="http://www.dataportability.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.dataportability.org');">DataPortability</a> co-founders Chris Saad and Daniela Barbosa gave a <a href="http://www.krisjordan.com/2008/09/18/chris-saad-daniela-barbosa-understanding-the-basics-of-personal-data-and-dataportability/" target="_blank">great session</a> on the basic motivations behind the movement. The future the DataPortability group is trying to create, one which allows us to owning our data, our contacts, our relationships, etc. and be able to move them freely and easily between the on-line systems we use sounds truly empowering. The big players are joining the party: Microsoft, Google, Facebook, Six Apart, Linked In, Yahoo, Digg, Plaxo, MySpace. But Chris says &#8220;Who cares about them? This is a grassroots effort!&#8221;</p>
<p><a href="http://www.josephsmarr.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.josephsmarr.com');">Joseph Smarr</a>, Chief Architect of <a href="http://www.plaxo.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.plaxo.com');">Plaxo</a>, gave another <a href="http://http://www.krisjordan.com/2008/09/19/joseph-smarr-tying-it-all-together-implementing-the-open-web/">interesting session</a> on the major components of the open web and how they fit together. OAuth, OpenID, Open Social, and others were covered. The feeling I walked away with is that <em>we&#8217;re a lot closer than I thought.</em></p>
<h2><a href="http://danga.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/danga.com');"><img class="alignright size-thumbnail wp-image-388" title="Danga" src="http://www.krisjordan.com/wp-content/uploads/2008/09/danga-150x150.jpg" alt="" width="105" height="105" /></a>5. <a href="http://www.krisjordan.com/2008/09/18/joe-stump-scaling-digg-and-other-web-applications/" target="_blank">Web Scalability thanks to Async &amp; Danga</a></h2>
<p>&#8220;You can’t drop something in 40,000 buckets, synchronously, at once&#8221;, said Digg&#8217;s Lead Architect, Joe Stump in his session &#8220;<a href="../2008/09/18/joe-stump-scaling-digg-and-other-web-applications/">Scaling Digg and Other Web Applications</a>&#8220;. He was referencing what happens when Kevin Rose posts a message on Twitter. (<a href="http://twitter.com/kevinrose" onclick="javascript:pageTracker._trackPageview ('/outbound/twitter.com');">Rose</a> <em>actually </em>has nearly 65,000 followers on Twitter) Asynchronous task queuing is how the folks at Digg, Twitter, and Flickr deal with problems that are <em>really hard</em> to do in real time in any scalable fashion.</p>
<p>Just about all of Brad Fitzpatrick&#8217;s (of LiveJournal and OpenID fame) lightweight systems software, freely available at Danga.com, seems to be used by the biggest Web 2.0 players to achieve scale. That memcached, gearman, perlbal, djabberd, and mogilefs, all came out of Fitzpatrick and Danga is just incredible. No wonder Google gobbled him up from Six Apart.</p>
<h3><img class="alignright size-medium wp-image-377" title="Twitter API" src="http://www.krisjordan.com/wp-content/uploads/2008/09/twitterapi_logo.png" alt="" width="119" height="28" /></h3>
<h2>4. <a href="http://www.krisjordan.com/2008/09/16/web-20-expo-building-successful-next-generation-web-20-apps-from-dion-hinchcliffe/">Web 2.0 Traffic: It&#8217;s Out-of-Band<br />
</a></h2>
<p>The knowledge tidbit that stuck out more in my mind than any other was that Twitter gets 10 times the amount of traffic from its API than it does through its website. It makes sense, I&#8217;d just never acknowledged it explicitly. <a href="http://www.krisjordan.com/2008/09/16/web-20-expo-building-successful-next-generation-web-20-apps-from-dion-hinchcliffe/">Dion Hinchcliffe&#8217;s workshop</a> painted a similar story for many other Web 2.0 successes. The canonical example is YouTube with the embedded video. The decision to put html snippets plainly visible, right beside of the video, was perhaps their most genius move. Modern web applications and services are making themselves relevant by opening as many channels of distribution possible through feeds, widgets, badges, and programmable APIs.</p>
<h3><a href="http://www.php.net" onclick="javascript:pageTracker._trackPageview ('/outbound/www.php.net');"><img class="alignright size-thumbnail wp-image-375" title="PHP" src="http://www.krisjordan.com/wp-content/uploads/2008/09/php.gif" alt="" width="84" height="47" /></a></h3>
<h2>3. <a href="http://www.krisjordan.com/2008/09/16/cal-henderson-scalable-web-architectures-common-patterns-and-approaches/" target="_blank">Cal Henderson&#8217;s PHP Tent Revival</a></h2>
<p>If not for Cal Henderson I may have never have touched PHP again. I&#8217;m probably going to come back to this topic in more depth in a future post but Cal&#8217;s workshop &#8220;<a href="http://www.krisjordan.com/2008/09/16/cal-henderson-scalable-web-architectures-common-patterns-and-approaches/">Scalable Web Architectures: Common Patterns and Approaches</a>&#8221; renewed my interest in, relationship with, and respect for PHP. The funny thing is that wasn&#8217;t even the point of the talk. Cal and <a href="http://www.krisjordan.com/2008/09/18/joe-stump-scaling-digg-and-other-web-applications/">Joe Stump of Digg</a>&#8217;s succinct point that <em>Langauges Don&#8217;t Scale</em> is right on. Sure PHP isn&#8217;t as beautiful, trendy, or well designed as Python or Ruby are. However, some of the design decisions made by PHP&#8217;s Rasmus, specifically the &#8217;shared nothing&#8217;ness, make it a great technology for web applications. There&#8217;s a reason why Facebook, Digg, Flickr, and co. are still on it.</p>
<p>After Cal&#8217;s workshop I asked him: <strong>if you could do it all over again with Flickr would you choose to go with Python or Ruby?</strong> Cal&#8217;s answer: <strong>Nope, I&#8217;d do it in PHP.</strong></p>
<h3><a href="http://www.krisjordan.com/2008/09/17/jason-fried-10-things-weve-learned-at-37signals/"><img class="alignright size-thumbnail wp-image-376" title="Bambi on Ice" src="http://www.krisjordan.com/wp-content/uploads/2008/09/bambi_ice-150x150.jpg" alt="" width="105" height="105" /></a></h3>
<h2>2. <a href="http://www.krisjordan.com/2008/09/17/jason-fried-10-things-weve-learned-at-37signals/" target="_blank">Set Your Baby Free</a></h2>
<p>By grooming and nurturing a web app internally for an extended period of time is you lose a lot of value. <a href="http://www.krisjordan.com/2008/09/17/jason-fried-10-things-weve-learned-at-37signals/">Jason Fried</a>&#8217;s notion of &#8220;half a product is better than a half-assed product&#8221; is so fitting here. <a href="http://www.krisjordan.com/2008/09/18/sandy-jen-scaling-synchronous-web-apps-lessons-learned-from-meebo/">Sandy Jen of Meebo echoes similar notions in her talk</a>: Start out with something simple, see if it works, evolve. Bring your customers into the feedback loop as quickly as possible. Joshua Schachter, founder of delicious, spoke of the exact same sentiments in his talk on &#8220;<a href="http://www.krisjordan.com/2008/09/17/joshua-schachter-lessons-learned-in-scaling-and-building-social-systems/">Scaling and Building Social Systems</a>&#8220;.</p>
<h2>1. Want to Set the World on Fire? <em>YOU </em>Better Bring the Fire.</h2>
<p><em>If <span style="text-decoration: underline;">you</span> are not bringing the heat, get out of the kitchen</em>. Passion was the common thread amongst the most inspiring talks I saw at the conference. Between <a href="http://garyvaynerchuk.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/garyvaynerchuk.com');">Gary Vaynerchuk</a>, <a href="http://www.37signals.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.37signals.com');">Jason Fried</a>, and <a href="http://www.huffingtonpost.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.huffingtonpost.com');">Arianna Huffington</a> the message was  consistent: be passionate. I&#8217;m going to let Gary roll this one out with his amazingly energetic keynote on building personal brand&#8230;</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="390" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/Ac6tAIa8DQ" /><embed type="application/x-shockwave-flash" width="480" height="390" src="http://blip.tv/play/Ac6tAIa8DQ"></embed></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/KrisJordan?a=Skkq0hXG"><img src="http://feeds.feedburner.com/~f/KrisJordan?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=TtiXUSBF"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=TtiXUSBF" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=WstMG0cp"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=WstMG0cp" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/KrisJordan?a=UVLbs5Qy"><img src="http://feeds.feedburner.com/~f/KrisJordan?i=UVLbs5Qy" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.krisjordan.com/2008/09/25/10-high-order-bits-from-the-web-20-expo-in-ny/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.krisjordan.com/2008/09/25/10-high-order-bits-from-the-web-20-expo-in-ny/</feedburner:origLink></item>
	</channel>
</rss>
