<?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/" version="2.0">

<channel>
	<title>techPortal</title>
	
	<link>http://techportal.ibuildings.com</link>
	<description>Tutorials for better PHP</description>
	<lastBuildDate>Wed, 25 Aug 2010 08:11:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ibuildingstechportal" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="ibuildingstechportal" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>DPCRadio: Designing for Reusability</title>
		<link>http://techportal.ibuildings.com/2010/08/25/designing-for-reusability/</link>
		<comments>http://techportal.ibuildings.com/2010/08/25/designing-for-reusability/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 08:00:11 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[derick rethans]]></category>
		<category><![CDATA[dpc10]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[reusability]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2253</guid>
		<description><![CDATA[Speaker: Derick Rethans This session explain a certain set of design issues for library code that either is often extended, or created with extending and inheritance in mind. There are many ways how a library can be designed to make it both easier to test, as well as for external developers to consume and use. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Speaker: Derick Rethans</strong><br />
This session explain a certain set of design issues for library code that either is often extended, or created with extending and inheritance in mind. There are many ways how a library can be designed to make it both easier to test, as well as for external developers to consume and use. This presentation provides techniques for doing so.</p>
<p>&nbsp;</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=DPCRadio%3A%20Designing%20for%20Reusability&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=DPCRadio%3A%20Designing%20for%20Reusability%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;t=DPCRadio%3A%20Designing%20for%20Reusability" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;title=DPCRadio%3A%20Designing%20for%20Reusability&amp;bodytext=Speaker%3A%20Derick%20Rethans%0D%0AThis%20session%20explain%20a%20certain%20set%20of%20design%20issues%20for%20library%20code%20that%20either%20is%20often%20extended%2C%20or%20created%20with%20extending%20and%20inheritance%20in%20mind.%20There%20are%20many%20ways%20how%20a%20library%20can%20be%20designed%20to%20make%20it%20both%20easier%20t" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;title=DPCRadio%3A%20Designing%20for%20Reusability" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;title=DPCRadio%3A%20Designing%20for%20Reusability&amp;notes=Speaker%3A%20Derick%20Rethans%0D%0AThis%20session%20explain%20a%20certain%20set%20of%20design%20issues%20for%20library%20code%20that%20either%20is%20often%20extended%2C%20or%20created%20with%20extending%20and%20inheritance%20in%20mind.%20There%20are%20many%20ways%20how%20a%20library%20can%20be%20designed%20to%20make%20it%20both%20easier%20t" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;title=DPCRadio%3A%20Designing%20for%20Reusability&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=Speaker%3A%20Derick%20Rethans%0D%0AThis%20session%20explain%20a%20certain%20set%20of%20design%20issues%20for%20library%20code%20that%20either%20is%20often%20extended%2C%20or%20created%20with%20extending%20and%20inheritance%20in%20mind.%20There%20are%20many%20ways%20how%20a%20library%20can%20be%20designed%20to%20make%20it%20both%20easier%20t" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;title=DPCRadio%3A%20Designing%20for%20Reusability" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F25%2Fdesigning-for-reusability%2F&amp;title=DPCRadio%3A%20Designing%20for%20Reusability" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/08/25/designing-for-reusability/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/2010_003.mp3" length="88796552" type="audio/mpeg" />
		</item>
		<item>
		<title>DPCRadio: Technical Debt</title>
		<link>http://techportal.ibuildings.com/2010/08/17/technical-debt/</link>
		<comments>http://techportal.ibuildings.com/2010/08/17/technical-debt/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 09:00:23 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Elizabeth Naramore]]></category>
		<category><![CDATA[teams]]></category>
		<category><![CDATA[technical debt]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2251</guid>
		<description><![CDATA[Speaker: Elizabeth Naramore Technical debt is something that most project teams or independent developers have to deal with &#8211; we take shortcuts to push out releases, we don&#8217;t focus on quality, deadlines need to be met, quick fixes slowly become the standard. Whatever the reason, if we don&#8217;t manage our technical debt (not unlike financial [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Speaker: Elizabeth Naramore</strong><br />
Technical debt is something that most project teams or independent developers have to deal with &#8211; we take shortcuts to push out releases, we don&#8217;t focus on quality, deadlines need to be met, quick fixes slowly become the standard. Whatever the reason, if we don&#8217;t manage our technical debt (not unlike financial debt), before too long our applications are technically bankrupt, and we are forced to completely refactor and start anew.</p>
<p>In this talk, we will discuss what technical debt is, when it is acceptable and when it isn&#8217;t, and strategies for effectively managing it, both on an independent and team level. We&#8217;ll talk about how it affects the entire team and how to work through minimizing it, as well as working effectively as a team to address it. </p>
<p>(see also the slides from this talk: <a href="http://naramore.net/slides/DPC10-techdebt.pdf">http://naramore.net/slides/DPC10-techdebt.pdf</a>)</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=DPCRadio%3A%20Technical%20Debt&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=DPCRadio%3A%20Technical%20Debt%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;t=DPCRadio%3A%20Technical%20Debt" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;title=DPCRadio%3A%20Technical%20Debt&amp;bodytext=Speaker%3A%20Elizabeth%20Naramore%0D%0ATechnical%20debt%20is%20something%20that%20most%20project%20teams%20or%20independent%20developers%20have%20to%20deal%20with%20-%20we%20take%20shortcuts%20to%20push%20out%20releases%2C%20we%20don%27t%20focus%20on%20quality%2C%20deadlines%20need%20to%20be%20met%2C%20quick%20fixes%20slowly%20become%20the%20" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;title=DPCRadio%3A%20Technical%20Debt" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;title=DPCRadio%3A%20Technical%20Debt&amp;notes=Speaker%3A%20Elizabeth%20Naramore%0D%0ATechnical%20debt%20is%20something%20that%20most%20project%20teams%20or%20independent%20developers%20have%20to%20deal%20with%20-%20we%20take%20shortcuts%20to%20push%20out%20releases%2C%20we%20don%27t%20focus%20on%20quality%2C%20deadlines%20need%20to%20be%20met%2C%20quick%20fixes%20slowly%20become%20the%20" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;title=DPCRadio%3A%20Technical%20Debt&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=Speaker%3A%20Elizabeth%20Naramore%0D%0ATechnical%20debt%20is%20something%20that%20most%20project%20teams%20or%20independent%20developers%20have%20to%20deal%20with%20-%20we%20take%20shortcuts%20to%20push%20out%20releases%2C%20we%20don%27t%20focus%20on%20quality%2C%20deadlines%20need%20to%20be%20met%2C%20quick%20fixes%20slowly%20become%20the%20" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;title=DPCRadio%3A%20Technical%20Debt" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F17%2Ftechnical-debt%2F&amp;title=DPCRadio%3A%20Technical%20Debt" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/08/17/technical-debt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/2010_002.mp3" length="68445268" type="audio/mpeg" />
		</item>
		<item>
		<title>DPCRadio: APC &amp; Memcache the High Performance Duo</title>
		<link>http://techportal.ibuildings.com/2010/08/03/apc-memcache-the-high-performance-duo/</link>
		<comments>http://techportal.ibuildings.com/2010/08/03/apc-memcache-the-high-performance-duo/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 04:00:28 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[Ilia Alshanetsky]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2235</guid>
		<description><![CDATA[Speaker: Ilia Alshanetsky APC and Memcache both provide effective mechanism for caching data within PHP applications to improve performance and latency. This talk will cover when to use both of these tools to get the most of your apps and which workflows better suit each tool. &#160; Like it? Share it!]]></description>
			<content:encoded><![CDATA[<p><strong>Speaker: Ilia Alshanetsky</strong></p>
<p>APC and Memcache both provide effective mechanism for caching data within PHP applications to improve performance and latency. This talk will cover when to use both of these tools to get the most of your apps and which workflows better suit each tool.</p>
<p>&nbsp;</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;t=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;title=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo&amp;bodytext=Speaker%3A%20Ilia%20AlshanetskyAPC%20and%20Memcache%20both%20provide%20effective%20mechanism%20for%20caching%20data%20within%20PHP%20applications%20to%20improve%20performance%20and%20latency.%20This%20talk%20will%20cover%20when%20to%20use%20both%20of%20these%20tools%20to%20get%20the%20most%20of%20your%20apps%20and%20which%20workfl" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;title=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;title=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo&amp;notes=Speaker%3A%20Ilia%20AlshanetskyAPC%20and%20Memcache%20both%20provide%20effective%20mechanism%20for%20caching%20data%20within%20PHP%20applications%20to%20improve%20performance%20and%20latency.%20This%20talk%20will%20cover%20when%20to%20use%20both%20of%20these%20tools%20to%20get%20the%20most%20of%20your%20apps%20and%20which%20workfl" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;title=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=Speaker%3A%20Ilia%20AlshanetskyAPC%20and%20Memcache%20both%20provide%20effective%20mechanism%20for%20caching%20data%20within%20PHP%20applications%20to%20improve%20performance%20and%20latency.%20This%20talk%20will%20cover%20when%20to%20use%20both%20of%20these%20tools%20to%20get%20the%20most%20of%20your%20apps%20and%20which%20workfl" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;title=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F08%2F03%2Fapc-memcache-the-high-performance-duo%2F&amp;title=DPCRadio%3A%20APC%20%26amp%3B%20Memcache%20the%20High%20Performance%20Duo" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/08/03/apc-memcache-the-high-performance-duo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/2010_001.mp3" length="110963481" type="audio/mpeg" />
		</item>
		<item>
		<title>Creating Pluggable Applications Using Data Sourcing</title>
		<link>http://techportal.ibuildings.com/2010/07/12/creating-pluggable-applications-using-data-sourcing/</link>
		<comments>http://techportal.ibuildings.com/2010/07/12/creating-pluggable-applications-using-data-sourcing/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 09:41:27 +0000</pubDate>
		<dc:creator>Ivo Jansch</dc:creator>
				<category><![CDATA[Planet PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[data sourcing]]></category>
		<category><![CDATA[federation]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2145</guid>
		<description><![CDATA[The first versions of most projects are self-contained applications. They work as-is, without any connection to other applications. It often isn&#8217;t until a later release that there is focus on interoperability. They build import/export functionality into their applications or add webservices that allow other applications to interact with it. While this is an important steps [...]]]></description>
			<content:encoded><![CDATA[<p>The first versions of most projects are self-contained applications. They work as-is, without any connection to other applications. It often isn&#8217;t until a later release that there is focus on interoperability. They build import/export functionality into their applications or add webservices that allow other applications to interact with it.</p>
<p>While this is an important steps toward application interoperability, there is often an important step missing. Most interoperable applications lack one final feature that allows full seamless integration: <strong>data sourcing</strong>, or the ability to get the data it needs from elsewhere.</p>
<p><span id="more-2145"></span></p>
<p>With data sourcing, we are not just importing data into our applications, we are using outside sources as the source for that data without creating redundancy. A simple example is the data sourcing of the user information. Most applications have their own user table. Applications that feature data sourcing of users make it possible to tell the system to get the user data not from its internal database but from a different source, for example the database of another application, an LDAP server or a web service that provides the user data. In the case of user data, if you have five applications that each have a database of users, it would be a lot simpler to integrate those applications if you could use one of them as the master source for the user data and configure the others to refer to it. </p>
<p>The principle is applicable to more than just users. Groups comes to mind (particularly groups within an organization that you may want to use within your applications), and friends is another common topic (aren&#8217;t you tired of befriending all your friends on every new social website?). In the case of ecommerce systems it would be great if you could use data sourcing to get the actual product data from different systems. <a href="http://www.magentocommerce.com/">Magento</a>, the popular ecommerce application, has product import/export functionality, but there is no easy way to tell it to connect to a web service to get the data for products instead of looking at its own database. This makes it hard to plug Magento as an ecommerce module into a larger system; most implementations you will find have Magento at its core and other, more flexible, systems plugging into it.</p>
<p>Data sourcing can help applications such as Magento reach a wider audience and especially help it be used in enterprise scenarios where there are many components that together form a big system. </p>
<p>The concept of data sourcing is comparable to <a href="http://en.wikipedia.org/wiki/Dependency_injection">Dependency Injection</a>; instead of hardwiring the dependencies within the software, you tell it its dependencies so that at runtime it can connect to the correct components and get its data.</p>
<h2>Two Flavours of Data Sourcing</h2>
<p>When you want to use data sourcing, there are in essence two ways to do this.</p>
<h3>Synchronisation</h3>
<p>The first one is <strong>synchronisation</strong>. This means that the data is still local to the application, but it is (periodically or on the fly) synchronized with external applications. For the application being plugged into a system, this generally means that hardly any modifications are necessary; a script needs to be written that simply synchronises the data between the sources.</p>
<p>While this works in some situations, it is undesirable in most situations. If you have multiple applications you will end up with multiple copies of the data, and run the risk of having data out of sync between the sources. It can also lead to ownership or privacy issues. One application should be the owner of a data set; if that data set is exported to other applications then you lose a certain amount of control over it.</p>
<h3>Federation</h3>
<p>The better option is <strong>federation</strong>. Federation basically means that you will get the data from its source when you need it. You could still cache for performance reason but there is no mass synchronisation going on. This is the method we will be looking at in the rest of this article, as it is the one that is the most interesting, but also the one that requires work in the applications that want to make use of federation.</p>
<h2>Implementing Data Sourcing</h2>
<p>Imagine you have built an application that shows you a person&#8217;s wishlist. You may have a query in there somewhere that joins the wishlist table with the user table and a few auxiliary tables with categorisation information. If the application is built like that, and you decide to install the application within an environment with multiple applications, it will be hard to make the application use user accounts from another application; you will have to not only rewrite all the queries, you will also have to find a way to connect the application data with the external user accounts. There are a few things that will help you make your application ready for data sourcing, so let&#8217;s take a look at them.</p>
<h3>Models</h3>
<p>If your application is set up according to the Model/View/Controller (MVC) paradigm, then your business logic is already isolated within your models. This will make it easier to source the data from outside sources. It&#8217;s a matter of taking the user model and changing that to get the users from elsewhere. Using models within an application is a recommendation that I would make regardless of whether you plan on doing data sourcing, but it is particularly helpful when abstracting data away from your core application. Here is a simple code snippet that illustrates the idea, without giving detail:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> UserModel
<span style="color: #009900;">&#123;</span>
    <span style="color: #339933;">....</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
       <span style="color: #666666; font-style: italic;">// Classic db code replaced by external data source</span>
       <span style="color: #666666; font-style: italic;">// return db::getrows(&quot;select * from users where id=:1&quot;, $id); </span>
&nbsp;
       <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSoapClient</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In this example, the application will no longer fetch its data from the database, but use a SOAP client to retrieve the data. Of course it is very easy if the SOAP server has the exact same interface as our model, but that will rarely be the case when you&#8217;re talking to external services.   If it differs, you may have to do some parameter and result set transformations, but you get the idea.</p>
<h3>Protocol Abstraction</h3>
<p>In the above example we are connecting to a SOAP service, which allows us to get the users from another application if it has a SOAP service, but what happens if your application is used in a scenario where there is no SOAP server, or the SOAP server uses a different set of methods? If we want to be flexible, we have to abstract the data source from our model. This is where the &#8216;Data Mapper&#8217; design pattern, presented by Martin Fowler in his book <a href="http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420">Patterns of Enterprise Application Architecture</a>, comes in handy. This pattern abstracts the data source away from the model. Our above example, adapted to include this idea, could look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> UserModel
<span style="color: #009900;">&#123;</span>
    <span style="color: #339933;">...</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDataMapper</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>You could then provide several data mapper implementations for all the external sources your application supports:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> DataMapper_User_Mysql implements DataMapper_User <span style="color: #009900;">&#123;</span> <span style="color: #339933;">...</span> <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">class</span> DataMapper_User_SomeSOAPService 
                         <span style="color: #000000; font-weight: bold;">extends</span> DataMapper_User_SOAP_Abstract 
                         implements DataMapper_User <span style="color: #009900;">&#123;</span> <span style="color: #339933;">...</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Note the use of &#8216;SomeSoapService&#8217; in the name and not just &#8216;SOAP&#8217;. SOAP is a standard but every SOAP service can implement their own methods, so we would have to have a separate mappers for different services. To avoid reinventing the wheel across different SOAP services we can derive from a general abstract SOAP class that takes care of the SOAP bits that are standard across all SOAP services. Later we will see how REST and the use of standards make this easier.</p>
<h3>REST</h3>
<p>REST is a nicer protocol than SOAP because it&#8217;s not only easier to implement, it has a lot less overhead and is easier to standardize. Because REST basically uses resource urls and the HTTP verbs to operate on them, they make data sourcing easier. For example, consider the following resource urls: </p>
<ul>
<li>http://example.com/users</li>
<li>http://example.com/users/42</li>
</ul>
<p></p>
<p>The first resource is a collection of users. We can retrieve the users using an HTTP GET request, we can add users using HTTP PUT, etc. The second resource is an individual user, which we can retrieve by performing a GET request, delete by performing a DELETE request etc.</p>
<p>Applying this to your application might mean that in the end, all you need to do is add some configuration into your application, rather than needing to modify code, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$datasources</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'userservice'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'SomePeopleService'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'groupservice'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'SomeGroupService'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Your REST data mapper then performs simple REST calls to retrieve it&#8217;s data through these services. Of course, you would still have to know what results to expect and how to map the results to your specific implementation, so you still might end up using multiple REST data mappers. The use of finer grained standards helps here. REST makes things easy; knowing that the response will be JSON will make things even easier; knowing that the JSON response is formatted according to the <A href="http://code.google.com/apis/opensocial/">OpenSocial</a> standard makes it peanuts. Which brings us to the final topic.</p>
<h2>Standards</h2>
<p>Federating access to applications for centrally managed users is very common. Large organisations deal with this all the time and nowadays, with so many social networking applications, you can see most websites use it. Services allow you to login using your Twitter or Facebook account for example. </p>
<p>Standards have been created to make it easy to work with centrally managed users. Here are a few that will be interesting for you to look at if you are looking to improve your applications in this area:</p>
<ul>
<li><a href="http://openid.net">OpenID</a>; a standard for having users log in using an account from one provider to access another provider. In essence it allows users to have one username/password for multiple services. Zend Devzone has a <a href="http://devzone.zend.com/article/3581">nice tutorial on OpenID</a> to get you started.</p>
<li><a href="http://oauth.net/">OAuth</a>; OAuth is a protocol designed to handle the actual authentication process across applications. OAuth allows an application to grant access to particular resources to an identity that was provided by another web site. There is a <a href="http://code.google.com/p/oauth-php/">library on google code</a> to make it easier to integrate oauth in your applications.
<li><a href="http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language">SAML</a>; a more enterprise grade way to deal with authenticating users, that includes things such as identify verification and digital signatures so services know that the person that&#8217;s logging in is actually the person they think they are dealing with. If you want to work with SAML, you will want to look at <a href="http://rnd.feide.no/simplesamlphp">simpleSAMLphp</a>, which implements the most important parts of the SAML protocol in a relatively easy to understand PHP wrapper.
<li><a href="http://www.opensocial.org/">OpenSocial</a>; a standard targeted at social networking, which provides interoperability for users, groups, status updates etc. The <a href="http://code.google.com/p/opensocial-php-client/">OpenSocial PHP client</a> on google code is a good starting point.
</ul>
<p></p>
<p>For users, groups, privileges and general user data there are plenty of standards to choose from, and all of them have PHP implementations that can help get you started. For other data you may want to develop your own protocols and interfaces, and I hope to have given you enough information to get you started building applications that can get their data from external sources. If more applications are built this way, then the web will become much more pluggable!</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;t=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;title=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing&amp;bodytext=The%20first%20versions%20of%20most%20projects%20are%20self-contained%20applications.%20They%20work%20as-is%2C%20without%20any%20connection%20to%20other%20applications.%20It%20often%20isn%27t%20until%20a%20later%20release%20that%20there%20is%20focus%20on%20interoperability.%20They%20build%20import%2Fexport%20functionality%20i" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;title=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;title=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing&amp;notes=The%20first%20versions%20of%20most%20projects%20are%20self-contained%20applications.%20They%20work%20as-is%2C%20without%20any%20connection%20to%20other%20applications.%20It%20often%20isn%27t%20until%20a%20later%20release%20that%20there%20is%20focus%20on%20interoperability.%20They%20build%20import%2Fexport%20functionality%20i" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;title=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=The%20first%20versions%20of%20most%20projects%20are%20self-contained%20applications.%20They%20work%20as-is%2C%20without%20any%20connection%20to%20other%20applications.%20It%20often%20isn%27t%20until%20a%20later%20release%20that%20there%20is%20focus%20on%20interoperability.%20They%20build%20import%2Fexport%20functionality%20i" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;title=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F12%2Fcreating-pluggable-applications-using-data-sourcing%2F&amp;title=Creating%20Pluggable%20Applications%20Using%20Data%20Sourcing" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/07/12/creating-pluggable-applications-using-data-sourcing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Test Driven Challenge – Winners and Results</title>
		<link>http://techportal.ibuildings.com/2010/07/08/the-test-driven-challenge-%e2%80%93-winners-and-results/</link>
		<comments>http://techportal.ibuildings.com/2010/07/08/the-test-driven-challenge-%e2%80%93-winners-and-results/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 08:58:49 +0000</pubDate>
		<dc:creator>Ivo Jansch</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[minification]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2168</guid>
		<description><![CDATA[In May and June we ran another one of our PHP coding contest. We love to play with PHP and offer people a chance to show off their coding skills in exchange for prizes! This time the contest revolved around creating a class that satisfies a given unit test case. The test case contained tests [...]]]></description>
			<content:encoded><![CDATA[<p>In May and June we ran another one of our PHP coding contest. We love to play with PHP and offer people a chance to show off their coding skills in exchange for prizes!</p>
<p>This time the contest revolved around creating a class that satisfies a <a href="http://ibuildings.com/downloads/challenge/test_driven_challenge.zip">given unit test case</a>. </p>
<p>The test case contained tests for 7 mathematical operations. The contestants did not only have to guess the actual operation, but also provide a class that implements the operation in as few lines as possible. </p>
<h3>Two contests for the prize of one</h3>
<h4>Contest 1 &#8211; Smallest solution adhering to decent coding practices</h4>
<p>The main contest was just that; because there was some discussion on twitter regarding the &#8216;fewest lines as possible&#8217; we updated the contest with a rule about &#8216;good coding practice&#8217; and we ignored coding standard issues; so a brace on the same line or on the next line was considered equally good, and we accepted both regular if constructs and the ternary operator. Some contestants removed all methods from their code and replaced it by a single __call construct, but our jury decided that that is not considered a decent coding practice. </p>
<p><span id="more-2168"></span></p>
<h4>Contest 2 &#8211; Smallest possible code size</h4>
<p>To cater to those that liked to disregard good coding practices and just create something as small as possible, we had a no-prize side contest for just fame and glory. The entries for this contest are very interesting, we&#8217;ll share the top 10 entries we received.</p>
<h3>The winners!</h3>
<p>As with our previous contests, we have 3 categories. From all the contestants in each category that had all the operations right and had the shortest code we randomly picked a winner. Basically all challenges could be written with one line of actual algorithm code, but you&#8217;d be surprised how many needed almost a hundred lines of code to write the class.</p>
<p>Here are our category winners:</p>
<ul>
<li>Senior category: David Frame from the United Kingdom</p>
<li>Medium category: Piotr Młocek from Poland
<li>Junior category: Luca Lancioni from Italy</ul>
<p>
<p>Congratulations for winning in your category!</p>
<p>The iPad prize was then randomly raffled amongst the three category winners, and the winner is&#8230;..</p>
<p><strong>David Frame</strong>. Congrats with your iPad!</p>
<p>The other 2 winners get a ticket to the <a href="http://www.phpconference.nl">Dutch PHP Conference 2011</a>.</p>
<h3>The solution</h3>
<p>Here is a sample class that implements all the algorithms. It&#8217;s not a shortest one but it is more clear what the algorithms were in this version:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> NumberCruncher 
<span style="color: #009900;">&#123;</span> 
&nbsp;
  <span style="color: #666666; font-style: italic;">// Simple addition</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationA<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$x</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>	
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Simple multiplication</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationB<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Square / 2</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationC<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Factorial (10*9*8*7*6...)</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationD<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span>	
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>   
          <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> 
      <span style="color: #009900;">&#125;</span> 
      <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #b1b100;">return</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationD</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Fibonacci (0 1 1 2 3 5 8 13 21 34 55 89)</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationE<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">&lt;=</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$x</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationE</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationE</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Composite of B and C</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationF<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationC</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationB</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Composite of D and E</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationG<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationD</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">operationE</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The composite were the most difficult ones and were the ones where most contestants went wrong. operationF was also possible without composite by just providing the simple formula it was made up of, and that&#8217;s of course fine as well. operationD and operationE have variants that do not use recursion, but the ones that used recursion were generally shorter (even though it might come at a performance penalty, but that wasn&#8217;t a criterium in this contest).</p>
<h3>Remarkable</h3>
<p>Andy Thompson submitted a nice implementation of operationD. The array_product is a fairly unknown function in PHP, but it&#8217;s very suitable for this kind of operation:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">function</span> operationD<span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #990000;">array_product</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">range</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #990000;">max</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Another interesting thing to notice is that there are multiple ways to calculate the <a href="http://en.wikipedia.org/wiki/Fibonacci_number">Fibonacci sequence</a>. Most contestants used a simple recursive formula like the one above. Matthias Steimle was one of the few contestants that used the so-called &#8216;<a href="http://en.wikipedia.org/wiki/Golden_ratio">Golden Ratio</a>&#8216; (a seemingly magic number that helps calculate the Fibonnaci Sequence and played an important role in Dan Brown&#8217;s Da Vinci Code). The golden ratio is the square root of 5, plus 1, divided by 2, and it calculates Fibonnaci numbers in Matthias&#8217; entry like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> operationE<span style="color: #009900;">&#40;</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      <span style="color: #b1b100;">return</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">+</span> <span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #990000;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">+</span> <span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span></pre></div></div>

<h3>The code minimization contest</h3>
<p>It is amazing how small a piece of code can get. We didn&#8217;t look for actual solutions to the algorithms; anything /<br />
To make it interesting, let&#8217;s walk through the top 10 entries starting with the longest. (Some linebreaks were added by yours truly to prevent horizontal scrolling).</p>
<h4>10. Peter Lindqvist (276 bytes)</h4>
<p>Here&#8217;s the number 10 entry:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">,</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$p</span><span style="color: #339933;">=</span><span style="color: #990000;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">';'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'+=4;*=3;*=$r/2;=o($r);=f($r);*=$r*
4.5;=o($r)-f($r)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>eval<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'$r=$a[0];$r'</span><span style="color: #339933;">.</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">ord</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">65</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">is_callable</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'f'</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">';'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">';function 
f($i){return$i&gt;1?f($i-1)+f($i-2):$i;}function o($i){return$i&lt;2?1:$i*o($i-1);}'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return<span style="color: #000088;">$r</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see, minified code becomes quite unreadable, but in Peter&#8217;s entry you can still recognize the operations from the algorithm. Peter&#8217;s solution is based on using very short function names, a __call interceptor so you only need one function and a bit of eval&#8217;d code.</p>
<h4>9. Robert Gramm (271 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">,</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$x</span><span style="color: #339933;">=</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000088;">$s</span><span style="color: #339933;">=</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'A'</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'B'</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'C'</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #000088;">$x</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'D'</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">2</span>?<span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span><span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">D</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-</span>
<span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'E'</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">2</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">:</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">E</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">E</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'F'</span>?<span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #000088;">$x</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">9</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span>
<span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'G'</span>?<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">D</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">E</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>Similar techniques, and slightly more efficient.</p>
<h4>8. Olivier Garcia (225 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">,</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$b</span><span style="color: #339933;">=</span><span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'v+4 v*3 v*$v/2 
v&gt;1?$v*$this-&gt;D($v-1):1 v&gt;0?ceil(exp($v/2-1)):0 v*$v*4.5 this-&gt;D($v)-$this-&gt;E($v)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000088;">$v</span><span style="color: #339933;">=</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'return$'</span><span style="color: #339933;">.</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">ord</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">65</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">';'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<h4>7. Paul Mitchell (214 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$f</span><span style="color: #339933;">,</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$n</span><span style="color: #339933;">=</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000088;">$d</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;self::D(<span style="color: #006699; font-weight: bold;">$n</span>&quot;</span><span style="color: #339933;">;</span><span style="color: #000088;">$e</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;self::E(<span style="color: #006699; font-weight: bold;">$n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$a</span><span style="color: #339933;">=</span><span style="color: #990000;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;*<span style="color: #006699; font-weight: bold;">$n</span>*4.5 *0+<span style="color: #006699; font-weight: bold;">$d</span>)-<span style="color: #006699; font-weight: bold;">$e</span>) +4 *3 *<span style="color: #006699; font-weight: bold;">$n</span>/2 ?<span style="color: #006699; font-weight: bold;">$n</span>*<span style="color: #006699; font-weight: bold;">$d</span>-1):1 &lt;2?<span style="color: #006699; font-weight: bold;">$n</span>:<span style="color: #006699; font-weight: bold;">$e</span>-2)+<span style="color: #006699; font-weight: bold;">$e</span>-1)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>r=<span style="color: #006699; font-weight: bold;">$n</span>${a[ord(strrev(<span style="color: #006699; font-weight: bold;">$f</span>))%7]};&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return<span style="color: #000088;">$r</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<h4>6. Michiel Hakvoort (210 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> NumberCruncher <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$t</span><span style="color: #339933;">=</span><span style="color: #990000;">debug_backtrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$f</span><span style="color: #339933;">=</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'file'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#s\(\s*(-?\d+(?:\.\d+)?)#'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$f</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'line'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>float<span style="color: #009900;">&#41;</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This entry deserves bonus points for being smaller than the previous entries, but still remain readable. This is the first entry we encounter in the top 10 that makes use of debug_backtrace to get information from the unittests, where previous entries used to still actually calculate the algorithms. So you can see things getting more dirty from here. :)</p>
<h4>5. James Andres (206 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">gzinflate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'=~NÑ
~B@^PE^?Ed@Í¤´~^ÜLJ­·~ BT^L^E~[`w~MTü÷v´z~Z9ç^~F)~ZL^HíÒ&gt;ò~
RG¼Å¢*ùpWSÖOÔÒ´È~ZÆ~D÷^R:k~@C`^@Ú[~CÁ~Q¶~Eg^C*~H&amp;^@\y
b~B~]^[º&gt;9éìc^SÐq-^U%Sä~E~@&gt;^EÉ^\ØÿÝ£ÒI~U~T~H~TXlH~\gAg,ç×
¥@^F «Z0À^@ºëúÆ| ^OD~[^KÉéau~YñR¶^\µò~U5¦þ~E^A| ^_~Yn±qü^@'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>A completely different approach. James zipped his code and used a runtime gzinflate and eval to unzip the code and run it! This makes it possible to pass the unit test using only 206 bytes! Arpad Ray also had an approach where he used zip, but since Arpad entered another entry that was even smaller than his zip version, only James&#8217; zip version made the top 10. (If you have trouble running the above code, I&#8217;m pretty sure WordPress will have ruined the character encoding, and I added newlines.)</p>
<h4>4. Joris van de Sande (154 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>static<span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>preg_match_all<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/\(\s*(.+?)
\s*,/'</span><span style="color: #339933;">,</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'argv'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$m</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return<span style="color: #000088;">$m</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>This is a debatable entry, because Joris assumes there&#8217;s a command line argument, which depending on how you run the unit test may not be present. Joris brings us to a range of entries that is more than 25% smaller than the previous one.</p>
<h4>3. Devis Lucato (153 bytes)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$t</span><span style="color: #339933;">=</span><span style="color: #990000;">debug_backtrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000088;">$l</span><span style="color: #339933;">=</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#([-.\d]+)\s*,#'</span><span style="color: #339933;">,</span><span style="color: #000088;">$l</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>line<span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return<span style="color: #000088;">$r</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>With a gain of just 1 byte over number 4, this code again cleverly uses debug_backtrace and an efficient file/preg_match combination.</p>
<h4>2. Tom van Looy (151 bytes)</h4>
<p>2 more bytes down!</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$f</span><span style="color: #339933;">,</span><span style="color: #000088;">$p</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">return</span> 
<span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strtok</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">end</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'('</span><span style="color: #339933;">,</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">join</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__CLASS__</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'Test.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$f</span>(<span style="color: #006699; font-weight: bold;">$p[0]</span>)&quot;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">','</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>I do have to mention that this one didn&#8217;t run out of the box because Tom&#8217;s code assumes the test class is in the same directory. If you look at the testcase you&#8217;ll see that this is not the case. Since the technique is clear however it&#8217;s still a nice entry.</p>
<h4>1. Arpad Ray (133 bytes)</h4>
<p>And kudos to Arpad for completely squashing the competition by using 18 bytes less than the runner up. As you can see, the winning entry even fits in a tweet! Arpad managed to perfect the simplicity of parsing the testcase using debug_backtrace and a simple split.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #000000; font-weight: bold;">class</span> NumberCruncher<span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">function</span> __call<span style="color: #009900;">&#40;</span><span style="color: #000088;">$m</span><span style="color: #339933;">,</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$b</span><span style="color: #339933;">=</span><span style="color: #990000;">debug_backtrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$f</span><span style="color: #339933;">=</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return<span style="color: #339933;">+</span><span style="color: #990000;">next</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'\('</span><span style="color: #339933;">,</span><span style="color: #000088;">$f</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>line<span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Conclusion</h3>
<p>We had great fun running this contest, we hope you enjoyed it too. Keep an eye on <a href="http://ibuildings.com/challenge">http://ibuildings.com/challenge</a> or <a href="http://twitter.com/ibuildings">follow our Twitter account</a> to make sure you don&#8217;t miss the next one!</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;t=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;title=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results&amp;bodytext=In%20May%20and%20June%20we%20ran%20another%20one%20of%20our%20PHP%20coding%20contest.%20We%20love%20to%20play%20with%20PHP%20and%20offer%20people%20a%20chance%20to%20show%20off%20their%20coding%20skills%20in%20exchange%20for%20prizes%21%0D%0A%0D%0AThis%20time%20the%20contest%20revolved%20around%20creating%20a%20class%20that%20satisfies%20a%20given%20" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;title=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;title=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results&amp;notes=In%20May%20and%20June%20we%20ran%20another%20one%20of%20our%20PHP%20coding%20contest.%20We%20love%20to%20play%20with%20PHP%20and%20offer%20people%20a%20chance%20to%20show%20off%20their%20coding%20skills%20in%20exchange%20for%20prizes%21%0D%0A%0D%0AThis%20time%20the%20contest%20revolved%20around%20creating%20a%20class%20that%20satisfies%20a%20given%20" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;title=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=In%20May%20and%20June%20we%20ran%20another%20one%20of%20our%20PHP%20coding%20contest.%20We%20love%20to%20play%20with%20PHP%20and%20offer%20people%20a%20chance%20to%20show%20off%20their%20coding%20skills%20in%20exchange%20for%20prizes%21%0D%0A%0D%0AThis%20time%20the%20contest%20revolved%20around%20creating%20a%20class%20that%20satisfies%20a%20given%20" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;title=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F07%2F08%2Fthe-test-driven-challenge-%25e2%2580%2593-winners-and-results%2F&amp;title=The%20Test%20Driven%20Challenge%20%E2%80%93%20Winners%20and%20Results" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/07/08/the-test-driven-challenge-%e2%80%93-winners-and-results/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>DPC 2010: Sessions and Slides</title>
		<link>http://techportal.ibuildings.com/2010/06/14/dpc-2010-sessions-and-slides/</link>
		<comments>http://techportal.ibuildings.com/2010/06/14/dpc-2010-sessions-and-slides/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 14:07:06 +0000</pubDate>
		<dc:creator>Lorna Mitchell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[dpc10]]></category>
		<category><![CDATA[dutch]]></category>
		<category><![CDATA[dutch php conference]]></category>
		<category><![CDATA[ibuildings]]></category>
		<category><![CDATA[joind.in]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[speakers]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2107</guid>
		<description><![CDATA[The Dutch PHP Conference is over for another year &#8211; we had a wonderful time hosting you all in Amsterdam and we were delighted so many people were able to join us for 3 days of serious technical learning (with some beer on the side of course!). While the event itself has finished, the content [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://phpconference.nl">Dutch PHP Conference</a> is over for another year &#8211; we had a wonderful time hosting you all in Amsterdam and we were delighted so many people were able to join us for 3 days of serious technical learning (with some beer on the side of course!).  While the event itself has finished, the content will live on in our <a href="http://techportal.ibuildings.com/dpc-radio/">DPC Radio</a> podcast series, where we&#8217;ll be broadcasting audio from the main tracks at the conference through the year.  Plenty of the speakers have already uploaded their slides, read on for a breakdown of ratings and links to slides for those talks that have them &#8211; and don&#8217;t forget to rate all the talks you saw on <a href="http://joind.in/event/dpc10">joind.in</a>! (You can leave general event info too &#8211; click on the comments tab on the events page)</p>
<p><span id="more-2107"></span></p>
<table>
<tr>
<th>Talk</th>
<th>Speaker</th>
<th>Rating and Links</th>
</tr>
<tr>
<td><a href="http://joind.in/1525">Quality Assurance in PHP Projects</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Sebastian Bergmann </td>
<td><a href="http://www.slideshare.net/sebastian_bergmann/quality-assurance-in-php-projects-4462517">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1531">Zend Framework Application Patterns &#8211; Part 2</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Matthew Weier O&#8217;Phinney and Rob Allen </td>
<td><a href="http://www.slideshare.net/weierophinney/zend-framework-workshop-4480868">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1535">Premature Optimization Mistakes</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Ilia Alshanetsky </td>
<td><a href="http://ilia.ws/files/Dutch_PHP_Conference_2010_OPM.pdf">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1536">Technical Debt</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Elizabeth Naramore </td>
<td><a href="http://naramore.net/slides/DPC10-techdebt.pdf">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1756">Scrum in the Wild</a> (uncon)<br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Mike van Riel </td>
<td><a href="http://www.slideshare.net/mikevanriel/scrum-in-the-wild-at-dpc10">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1538">Working with Zend_Form</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Rob Allen </td>
<td><a href="http://akrabat.com/talks/#zendform">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1537">The Cake Is A Lie</a><br /><img src="http://joind.in/inc/img/rating-3.gif"></td>
<td>Sebastian Bergmann </td>
<td><a href="http://www.slideshare.net/sebastian_bergmann/the-cake-is-a-lie-4475889">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1539">The Art of Scalability</a><br /><img src="http://joind.in/inc/img/rating-3.gif"></td>
<td>Lorenzo Alberton </td>
<td><a href="http://www.alberton.info/talks/show/id/3">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1540">Graphics with Cairo</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Michael MacLean </td>
<td><a href="http://mgdm.net/talks/dpc10/cairo.pdf">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1541">PHP through the eyes of a hoster</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Thijs Feryn </td>
<td><a href="http://slidesha.re/cgELph">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1758">Multithreading in PHP</a> (uncon)<br /><img src="http://joind.in/inc/img/rating-3.gif"></td>
<td>Dimitriy Remerov </td>
<td><a href="http://www.slideshare.net/dimitriyremerov/multithreading-in-php">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1544">Database version control without pain</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Harrie Verveer </td>
<td><a href="http://tinyurl.com/dpc-dbversioncontrol">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1542">Writing Re-usable, RESTful Web Services with Zend Framework</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Matthew Weier O&#8217;Phinney Matthew Weier O&#8217;Phinney </td>
<td><a href="http://www.slideshare.net/weierophinney/building-restful-zend-framework-applications">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1547">Advanced Git</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>David Soria Parra </td>
<td><a href="http://www.slideshare.net/segv/advanced-git">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1545">Testing untestable code</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Stephan Hochdörfer </td>
<td><a href="http://www.slideshare.net/shochdoerfer/dpc10-testing-untestable-code">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1549">Agile PHP Software Development</a><br /><img src="http://joind.in/inc/img/rating-2.gif"></td>
<td>Thorsten Rinne </td>
<td><a href="http://www.slideshare.net/mayflowergmbh/agile-php-software-development">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1770">Starting Continuous Integration, Why and How?</a> (uncon)<br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Martin de Keijzer </td>
<td><a href="http://www.slideshare.net/Martin82/continuous-integration-why-and-how-dpc-uncon-quickprep-version">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1551">Stress-free deployment</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Rob Allen </td>
<td><a href="http://akrabat.com/talks/#sfd">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1553">Real World Dependency Injection</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Stephan Hochdörfer </td>
<td><a href="http://www.slideshare.net/shochdoerfer/dpc10-real-world-dependency-injection">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1651">Embracing Constraints with CouchDB</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>David Zuelke </td>
<td><a href="http://www.slideshare.net/Wombert/embracing-constraints-with-couchdb">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1554">APC &#038; Memcache the High Performance Duo</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Ilia Alshanetsky </td>
<td><a href="http://ilia.ws/files/Dutch_PHP_Conference_APC_MEM2010.pdf">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1555">Where in the world: Geo data in PHP</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Marcus Deglos </td>
<td><a href="http://www.slideshare.net/manarth/where-in-the-world">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1558">Technical Writing 101</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Elizabeth Naramore </td>
<td><a href="http://naramore.net/slides/DPC10-tech-writing.pdf">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1556">In Search Of&#8230; Integrating Site Search</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Ian Barber </td>
<td><a href="http://www.slideshare.net/IanBarber/in-search-of">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1766">Content Driven ACL in the Model Layer (ZF)</a> (uncon)<br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Jeroen Keppens </td>
<td><a href="http://www.slideshare.net/jkeppens/content-driven-zendacl-in-the-model-layer">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1557">Design for Scalability with Hierarchical MVC</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Sam de Freyssinet </td>
<td><a href="http://www.slideshare.net/samsoir/design-for-scalability-with-hmvc">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1767">iPhone Apps With HTML5</a> (uncon)<br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Thorsten Rinne </td>
<td><a href="http://www.slideshare.net/mayflowergmbh/i-phone-apps-mit-html5">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1768">Building on Cairo</a> (uncon)<br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Michael MacLean </td>
<td><a href="http://mgdm.net/talks/dpc10/building-on-cairo.pdf">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1561">Domain NoSQL: Next Generation Models</a><br /><img src="http://joind.in/inc/img/rating-4.gif"></td>
<td>Matthew Weier O&#8217;Phinney </td>
<td><a href="http://www.slideshare.net/weierophinney/domain-nosql-next-generation-domain-modelling">Slides</a></td>
</tr>
<tr>
<td><a href="http://joind.in/1559">Reviewing PHP Code</a><br /><img src="http://joind.in/inc/img/rating-5.gif"></td>
<td>Sebastian Bergmann </td>
<td><a href="http://www.slideshare.net/sebastian_bergmann/php-code-review-4488307">Slides</a></td>
</tr>
</table>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=DPC%202010%3A%20Sessions%20and%20Slides&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=DPC%202010%3A%20Sessions%20and%20Slides%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;t=DPC%202010%3A%20Sessions%20and%20Slides" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;title=DPC%202010%3A%20Sessions%20and%20Slides&amp;bodytext=The%20Dutch%20PHP%20Conference%20is%20over%20for%20another%20year%20-%20we%20had%20a%20wonderful%20time%20hosting%20you%20all%20in%20Amsterdam%20and%20we%20were%20delighted%20so%20many%20people%20were%20able%20to%20join%20us%20for%203%20days%20of%20serious%20technical%20learning%20%28with%20some%20beer%20on%20the%20side%20of%20course%21%29.%20%20Whil" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;title=DPC%202010%3A%20Sessions%20and%20Slides" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;title=DPC%202010%3A%20Sessions%20and%20Slides&amp;notes=The%20Dutch%20PHP%20Conference%20is%20over%20for%20another%20year%20-%20we%20had%20a%20wonderful%20time%20hosting%20you%20all%20in%20Amsterdam%20and%20we%20were%20delighted%20so%20many%20people%20were%20able%20to%20join%20us%20for%203%20days%20of%20serious%20technical%20learning%20%28with%20some%20beer%20on%20the%20side%20of%20course%21%29.%20%20Whil" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;title=DPC%202010%3A%20Sessions%20and%20Slides&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=The%20Dutch%20PHP%20Conference%20is%20over%20for%20another%20year%20-%20we%20had%20a%20wonderful%20time%20hosting%20you%20all%20in%20Amsterdam%20and%20we%20were%20delighted%20so%20many%20people%20were%20able%20to%20join%20us%20for%203%20days%20of%20serious%20technical%20learning%20%28with%20some%20beer%20on%20the%20side%20of%20course%21%29.%20%20Whil" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;title=DPC%202010%3A%20Sessions%20and%20Slides" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F14%2Fdpc-2010-sessions-and-slides%2F&amp;title=DPC%202010%3A%20Sessions%20and%20Slides" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/06/14/dpc-2010-sessions-and-slides/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Web Services for PHP Developers</title>
		<link>http://techportal.ibuildings.com/2010/06/01/web-services-for-php-developers/</link>
		<comments>http://techportal.ibuildings.com/2010/06/01/web-services-for-php-developers/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 07:03:13 +0000</pubDate>
		<dc:creator>Lorna Mitchell</dc:creator>
				<category><![CDATA[Planet PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[jsonrpc]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[sugarcrm]]></category>
		<category><![CDATA[webservice]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=2086</guid>
		<description><![CDATA[In this world of sharing data, increasing numbers of sites and applications are making information available over web services. Whether we are building a service as a feature of our own development, or pulling in the information published by others, we will need to understand the different service types and how to work with them [...]]]></description>
			<content:encoded><![CDATA[<p>In this world of sharing data, increasing numbers of sites and applications are making information available over web services.  Whether we are building a service as a feature of our own development, or pulling in the information published by others, we will need to understand the different service types and how to work with them in PHP.  This article aims to give you the tools to do just that.</p>
<p><span id="more-2086"></span></p>
<h3>Starting at the Beginning: HTTP</h3>
<p>HTTP (HyperText Transport Protocol) is the language of the web, the communication channel over which we send our data.  As web developers, we often don&#8217;t need to really notice it is there but for web services there are some bits and pieces we should be aware of so let us take a few moments to refresh our memories.</p>
<p>When we surf the Internet, we make a series of <strong>requests</strong>, and receive <strong>responses</strong> in return containing the data we asked for.  There is nothing special about web services; they work in exactly the same way except that the data in the response is usually marked up for machine-consumption rather than for a browser.  When we use a browser, we are aware of the URL that we are requesting and we know that forms send additional POST data.  We also observe the HTML response, by viewing the source of the rendered page in the browser (or using cURL, if you&#8217;re really hardcore!)</p>
<p>Most web developers are also aware that there are other headers available, controlling cookies, caching and so on, but for web services these form an integral part of the information that is getting sent to and fro between client and server. We observe the headers in one of a number of ways probably the simplest is to use <a href="http://curl.haxx.se/">cURL</a> from your command line to observe the traffic.  Here&#8217;s an example of a request to the <a href="http://www.google.co.uk"> google</a> homepage:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ curl <span style="color: #660033;">-I</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.google.co.uk
HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span> <span style="color: #000000;">200</span> OK
Date: Sat, <span style="color: #000000;">29</span> May <span style="color: #000000;">2010</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">39</span>:<span style="color: #000000;">35</span> GMT
Expires: <span style="color: #660033;">-1</span>
Cache-Control: private, max-age=<span style="color: #000000;">0</span>
Content-Type: text<span style="color: #000000; font-weight: bold;">/</span>html; <span style="color: #007800;">charset</span>=ISO-<span style="color: #000000;">8859</span>-<span style="color: #000000;">1</span>
Set-Cookie: <span style="color: #007800;">PREF</span>=<span style="color: #007800;">ID</span>=375fcb45b134bfca:<span style="color: #007800;">TM</span>=<span style="color: #000000;">1275129575</span>:<span style="color: #007800;">LM</span>=<span style="color: #000000;">1275129575</span>:<span style="color: #007800;">S</span>=g68f-bMGCmCJluRj; <span style="color: #007800;">expires</span>=Mon, <span style="color: #000000;">28</span>-May-<span style="color: #000000;">2012</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">39</span>:<span style="color: #000000;">35</span> GMT; <span style="color: #007800;">path</span>=<span style="color: #000000; font-weight: bold;">/</span>; <span style="color: #007800;">domain</span>=.google.co.uk
Server: gws
X-XSS-Protection: <span style="color: #000000;">1</span>; <span style="color: #007800;">mode</span>=block
Transfer-Encoding: chunked</pre></div></div>

<p>Some particular headers are key when working with web services, here is an outline of some useful ones:</p>
<p><strong>Cookie</strong> (request) and <strong>Set-Cookie</strong> (response).  These control the cookies that the server gives to the client, and which the client provides on every request.  Most PHP sessions work via cookies, and these are handled invisibly by our browsers.  When we work with servers, we may have to manually receive, store and provide these when making requests and parsing responses.  Many web services are stateless, and so don&#8217;t use cookies, but some do use them and it is useful to be aware of these.  To be consuming the web from PHP is a bit of a conceptual shift, since usually we&#8217;re serving the web, but all the same principles apply.</p>
<p><strong>Status Codes</strong> (response).  Take a look at the headers shown in the response above: the first line shows &#8220;HTTP/1.1 200 OK&#8221;.  This tells us the version of HTTP that is in use (usually 1.1 although 1.0 does exist and is still used) and also the status of the response.  The status code is possibly the most important piece of information in the HTTP response header and this is something that will get a mention again and again in the course of this article.  The one shown here, 200, is good news and means that everything operated as expected.  The response codes are separated into classes and consist of three digits.  Anything starting with a 2 means everything was fine.  Something starting with a 3 indicates a redirect of some kind, with a 4 means there was a client error, and with a 5 there was a server error.  Some common status codes:</p>
<table>
<tr>
<th>Code&nbsp;&nbsp;</th>
<th>Meaning</th>
</tr>
<tr>
<td>200</td>
<td>OK</td>
</tr>
<tr>
<td>302</td>
<td>Found</td>
</tr>
<tr>
<td>301</td>
<td>Moved</td>
</tr>
<tr>
<td>401</td>
<td>Not Authorised</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
</tr>
<tr>
<td>404</td>
<td>Not Found</td>
</tr>
<tr>
<td>500</td>
<td>Internal Server Error</td>
</tr>
</table>
<p>For a full list of status codes, there is a great reference <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes">on wikipedia</a> showing various ones (some quite frivolous, in particular look for HTTP 418)</p>
<p><strong>Accept</strong> (request) and <strong>Content-Type</strong> (response).  These headers control the kind of content that is included in the response.  The client, when making the request, can indicate what format it would like using the Accept header.  When responding, the server should set the Content-Type in the response header so that the client will know how to interpret the response.</p>
<p>Having the server include metadata about the response type is really useful and also means that we can use this to check that we got the response we expected.  When I run into problems with web services it can often be because in the event of an error, the service returns some default web output as text/html, whereas I have PHP code trying to decode it as XML or JSON &#8230; and of course my code then fails horribly because the response format isn&#8217;t what I was expecting!  Checking the content type of the response before decoding can help to warn us that there has been a problem that we may need to handle.</p>
<h3>The Power of HTTP</h3>
<p>In the example mentioned above, where checking the content type of a response before decoding can alert us to the problem, we nicely illustrated some of the main advantages of using the functionality given to us by HTTP.   If we don&#8217;t take the time to set the headers correctly, or we don&#8217;t inspect them, we may not be aware that there is a problem or in the worst case our code may just not be able to handle what happened elegantly.  Setting these headers correctly in a service, and checking them appropriately when receiving a response, can really help us to write robust services and consumers.  If we were to rely purely on information being in the body, as a request parameter or perhaps by decoding the response and then checking for a status code within it, we have lost some of the built-in functionality of HTTP.  It is, by design, an envelope protocol to help us understand what is inside without necessarily having to do the work to decode it, or to try to decode it and then fail.  Seeing an error status code, a zero content length header, or an unexpected content type will all help us to understand what we have received before we even try to unpack it, which is fantastic!</p>
<h3>RPC Services</h3>
<p>One of the most common, and in my opinion, easiest service types to relate to is the RPC (Remote Procedure Call).  These web services actually feel more like distributed libraries than any kind of new-fangled service-oriented technology &#8230; and that is because that is all they are!  We make a request to a given endpoint, passing a method name and some arguments, and we get the response back.  The easiest way to illustrate what this looks like in PHP is to look at an example.  <a href="http://flickr.com">Flickr</a> has a nice RPC service, so let us take a look at an example making a call to their API.</p>
<p>We&#8217;re going to call their search method, and look for all photos tagged with &#8220;ibuildings&#8221;.  Flickr has a fairly prescriptive request/response format, so <a href="http://www.flickr.com/services/api/request.xmlrpc.html">read</a> their <a href="http://www.flickr.com/services/api/response.xmlrpc.html">docs</a> if you are interested in understanding how this lot goes together.  Working with the flickr API is probably a whole article in itself so I&#8217;ll try to keep that aspect to a minimum in this post.</p>
<p>Here&#8217;s the code, using the <a href="http://uk2.php.net/manual/en/book.curl.php">PHP curl extension</a> to handle the requests for us.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// build request format</span>
<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_string</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;?xml version=&quot;1.0&quot; ?&gt;&lt;methodCall /&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// method name</span>
<span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'methodName'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'flickr.photos.search'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// parameters list</span>
<span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'params'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'param'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'value'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'struct'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// add api key</span>
<span style="color: #000088;">$child</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'member'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$child</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'api_key'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$child</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'value'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'b3ed3314454a875f35d519900c819708'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// add tag to search for</span>
<span style="color: #000088;">$child</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'member'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$child</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'tags'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$child</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addChild</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'value'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'ibuildings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// make request</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://api.flickr.com/services/xmlrpc/'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">asXML</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$response_xml</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now if we inspect $response_xml we find a list of photo tags of results that match (if you&#8217;re interested, the content of this is the same as <a href="http://www.flickr.com/search/?q=ibuildings&#038;s=rec">this flickr search</a>) and we could use these results to display on another site or as part of an application.</p>
<p>RPC services in general are a nice way to start working with web services &#8211; they are a good fit for most applications, and they are easy for us to understand since we already know very well how to work with functions and arguments.  They may not be the &#8220;coolest&#8221; technology around but they are simple and personally I think that counts for a lot!  Using RPC services also means that we can easily work with our existing code, in the event that we aren&#8217;t always developing shiny new applications from scratch.  RPC makes it easy to publish existing libraries as a remotely-accessible service for another system, and also to switch out an existing local library class for a remote one, since the shape of their interfaces is so similar.</p>
<p>The example I showed here with flickr was an XML-RPC service but it is also very common to see and use JSON-RPC and indeed other formats such as serialised PHP arrays/objects are equally valid in this setting.  Choosing the right format depends entirely on your application and each has its advantages and disadvantages.  Time for a quick tangent to look at these!</p>
<h3>Data Formats</h3>
<p>When we think of web services, we commonly think of SOAP and other types of <strong>XML</strong>.  In fact these are really useful with web services and are relatively common as a result; we showed an XML example earlier in this post, which handled the XML using <a href="http://uk2.php.net/manual/en/book.simplexml.php">PHP&#8217;s SimpleXML extension</a>.  XML is ideal for communication between machines because it is quite verbose, which means it is precise and leaves little room for interpretation or ambiguity.  XML isn&#8217;t terribly easy to read without help from machines, which can make debugging a bit harder than working with a simpler format.  It is also fairly large in size terms for the data it represents, which isn&#8217;t important in most applications but at some edge cases this could make it a less appealing option.</p>
<p>Another very common format in use in web services is <strong>JSON</strong>.  While this format is named after its origins (JavaScript Object Notation), don&#8217;t be misled by the title.  JSON is in fact easily read and written from almost all programming languages &#8211; although for something like JavaScript or an iPhone where relatively limited string handling is available, JSON is an excellent choice.  It is lightweight, small for the data it represents and easy to parse although the small size does mean that it is less comprehensive than some of the other formats.  In particular JSON doesn&#8217;t include information about data types so it can be unclear what format the data was in when it was encoded.  Particularly exasperating is that it doesn&#8217;t know whether something was an object or an associative array &#8211; of course we can work around this but we must be aware of it.</p>
<p>Other possibilities include a serialised PHP format, which is a great choice if you know that client and server will both always run PHP.  This format has a lot of the advantages of JSON but does include some type information with the data, which can make it more useful.</p>
<h3>SOAP:  A Special Case of XML-RPC</h3>
<p>With the adoption of PHP rising in the enterprise, it is increasingly common for PHP applications to come into contact with other systems within an organisation written in languages such as Java and .NET.  In fact I am seeing more and more situations where PHP is being used as the &#8220;glue&#8221; to integrate between disparate systems written in these and other &#8220;enterprise&#8221; languages.  In terms of API access, these types of applications will commonly support SOAP through preference, and indeed even within the PHP ecosystem, we see SOAP implementations from various projects aimed more at business than the casual user.  In particular, both <a href="http://www.sugarcrm.com/">SugarCRM</a> and <a href="http://www.magentocommerce.com/">Magento</a> provide remote access via SOAP APIs.</p>
<p>Back in PHP 5, a <a href="http://uk2.php.net/manual/en/book.soap.php">SOAP extension</a> was included in PHP by default, and this makes working with SOAP services, especially those with a WSDL, trivial.  As an example, take a look at this example of pulling information from Magento Ecommerce:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #666666; font-style: italic;">// connect to soap server</span>
    <span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapClient<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://magento.local/api/v2_soap?wsdl=1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// log in</span>
    <span style="color: #000088;">$session</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">login</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'lorna'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">customerCustomerList</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I did say it was trivial!  All we need to do is instantiate a SoapClient object, giving the WSDL.  We can then call the methods outlined in the WSDL, passing the arguments as we would for a function.</p>
<blockquote><p><i>Note: This is an example of the Magento V2 API, for more information about Magento&#8217;s API, <a href="http://www.magentocommerce.com/wiki/doc/webservices-api/api">visit their wiki</a>.  This is another topic that would make a whole article by itself. </i></p></blockquote>
<h3>Strategies for Debugging</h3>
<p>As I mentioned earlier, the XML-based formats in general, and SOAP in particular, can be tricky to work with if you need to actually debug them.  Part of this is that if your code doesn&#8217;t handle SOAP faults or something unexpected goes wrong, it can be really hard to understand what is happening.  There is very little more annoying than spending all morning destroying your own code to find the error, only to discover the server has stopped responding correctly!  To help with this, I have a few strategies that I would like to share.</p>
<p>First of all, our good friend <strong>curl</strong>.  I worked on one project where I was producing a web service that was consumed by an application my colleagues were building.  I told them that I would only accept bug reports against my code if they sent me a replication case which used curl.  This was not welcome news to them, but they confessed later that about half of the &#8220;bugs&#8221; they found turned out to be in their own code when they looked closer.  Eliminating the consuming code as a source of problems is really important when working with remote services.</p>
<p>Another key approach, and something I use frequently myself alongside my development, is to use a <strong>proxy</strong>.  Personally I use <a href="http://www.wireshark.org">Wireshark</a> to show me what is happening &#8220;on the wire&#8221; while I work with web services.  I have also heard strong recommendations from industry peers for <a href="http://www.charlesproxy.com">Charles</a> which is non-free but very inexpensive and seems to be well-loved by its users.  Using a proxy, you can check exactly what is getting sent and received without making any alterations to your own code or changing the calls you make, which can very quickly help you diagnose errors.</p>
<h3>RESTful Services</h3>
<p>Perhaps the purest form of the web services over HTTP is REST.  If you are not familiar with RESTful principles then there is a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">great overview on Wikipedia</a> that explains it really well.  Many of the sites publishing information over web services will provide RESTful interfaces and these are easy to understand and simple to consume.</p>
<p>Good examples of these are Flickr who have a great RESTful API alongside all their other offerings, and <a href="http://twitter.com">twitter</a> who use a similar scheme for the URL design throughout their site as well as across their service.  This is really interesting, because you can use their services then almost seamlessly alongside their site.  Consider this URL:</p>
<p><a href="http://search.twitter.com/search?q=techportal">http://search.twitter.com/search?q=techportal</a></p>
<p>Opening this in the browser will show the search results for &#8220;techportal&#8221; on twitter.  To request these from PHP in a JSON format is almost as simple, see this example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://search.twitter.com/search.json?q=techportal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$json</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We can inspect $json and see that we have the same data in JSON format.  The <a href="http://apiwiki.twitter.com/Twitter-API-Documentation">twitter API documentation</a> is rather good so if you&#8217;re looking for a good project to practise with, then this could be an ideal place to start!</p>
<h3>Web Services</h3>
<p>I hope this article has given a good overview of what web services are and how they look when they come in to form part of our code.  There is so much more on all of these various topics, and I am sure some of you will want to read more.  There are some links for you in the resources section below, and I hope that you will also add your own stories and resources in the comments &#8211; thanks for reading!</p>
<h3>Resources</h3>
<p><a href="http://www.flickr.com/services/api/">flickr API</a><br />
<a href="http://apiwiki.twitter.com/Twitter-API-Documentation">twitter API</a><br />
<a href="http://www.magentocommerce.com/wiki/doc/webservices-api/api">magento API</a><br />
<a href="http://www.sugarcrm.com/wiki/index.php?title=SOAP_Documentation">sugarcrm API</a><br />
<a href="http://curl.haxx.se/">curl</a> &#8211; command line http tool<br />
<a href="http://www.wireshark.org/">wireshark</a> and <a href="http://www.charlesproxy.com/">charles</a> &#8211; debugging proxies</p>
<p>Need to convince your managers about the value of Web Services?  Send them over to our excellent whitepaper <a href="http://ibuildings.com/whitepapers/introducing-service-apis">Introducing Service APIs</a> to explain how services fit in to modern application architecture.</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=Web%20Services%20for%20PHP%20Developers&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Web%20Services%20for%20PHP%20Developers%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;t=Web%20Services%20for%20PHP%20Developers" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;title=Web%20Services%20for%20PHP%20Developers&amp;bodytext=In%20this%20world%20of%20sharing%20data%2C%20increasing%20numbers%20of%20sites%20and%20applications%20are%20making%20information%20available%20over%20web%20services.%20%20Whether%20we%20are%20building%20a%20service%20as%20a%20feature%20of%20our%20own%20development%2C%20or%20pulling%20in%20the%20information%20published%20by%20others%2C" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;title=Web%20Services%20for%20PHP%20Developers" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;title=Web%20Services%20for%20PHP%20Developers&amp;notes=In%20this%20world%20of%20sharing%20data%2C%20increasing%20numbers%20of%20sites%20and%20applications%20are%20making%20information%20available%20over%20web%20services.%20%20Whether%20we%20are%20building%20a%20service%20as%20a%20feature%20of%20our%20own%20development%2C%20or%20pulling%20in%20the%20information%20published%20by%20others%2C" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;title=Web%20Services%20for%20PHP%20Developers&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=In%20this%20world%20of%20sharing%20data%2C%20increasing%20numbers%20of%20sites%20and%20applications%20are%20making%20information%20available%20over%20web%20services.%20%20Whether%20we%20are%20building%20a%20service%20as%20a%20feature%20of%20our%20own%20development%2C%20or%20pulling%20in%20the%20information%20published%20by%20others%2C" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;title=Web%20Services%20for%20PHP%20Developers" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F06%2F01%2Fweb-services-for-php-developers%2F&amp;title=Web%20Services%20for%20PHP%20Developers" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/06/01/web-services-for-php-developers/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Code and Release Management</title>
		<link>http://techportal.ibuildings.com/2010/05/25/code-and-release-management/</link>
		<comments>http://techportal.ibuildings.com/2010/05/25/code-and-release-management/#comments</comments>
		<pubDate>Tue, 25 May 2010 08:10:31 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eli white]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[versioning]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=1492</guid>
		<description><![CDATA[Speaker: Eli White Programmers seem to have a fairly good grasp on &#8216;how to write code&#8217;, but not always what to do with it once it&#8217;s been written. This talk with delve into details about how to manage your codebase, and how to manage releases (often intertwined). It will cover topics of coding standards and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/dpc-podcast.jpg" align="left" width="15%" style="margin:10px;"/>Speaker: <a href="http://eliw.com">Eli White</a></p>
<p>Programmers seem to have a fairly good grasp on &#8216;how to write code&#8217;, but not always what to do with it once it&#8217;s been written. This talk with delve into details about how to manage your codebase, and how to manage releases (often intertwined). It will cover topics of coding standards and focus heavily on how you choose to use versioning tools to handle your development and release processes. It will have a distinct Subversion(SVN) flavor to the talk, but the concepts will not be specific to SVN.</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=Code%20and%20Release%20Management&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Code%20and%20Release%20Management%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;t=Code%20and%20Release%20Management" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;title=Code%20and%20Release%20Management&amp;bodytext=Speaker%3A%20Eli%20White%0D%0A%0D%0AProgrammers%20seem%20to%20have%20a%20fairly%20good%20grasp%20on%20%27how%20to%20write%20code%27%2C%20but%20not%20always%20what%20to%20do%20with%20it%20once%20it%27s%20been%20written.%20This%20talk%20with%20delve%20into%20details%20about%20how%20to%20manage%20your%20codebase%2C%20and%20how%20to%20manage%20releases%20%28ofte" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;title=Code%20and%20Release%20Management" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;title=Code%20and%20Release%20Management&amp;notes=Speaker%3A%20Eli%20White%0D%0A%0D%0AProgrammers%20seem%20to%20have%20a%20fairly%20good%20grasp%20on%20%27how%20to%20write%20code%27%2C%20but%20not%20always%20what%20to%20do%20with%20it%20once%20it%27s%20been%20written.%20This%20talk%20with%20delve%20into%20details%20about%20how%20to%20manage%20your%20codebase%2C%20and%20how%20to%20manage%20releases%20%28ofte" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;title=Code%20and%20Release%20Management&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=Speaker%3A%20Eli%20White%0D%0A%0D%0AProgrammers%20seem%20to%20have%20a%20fairly%20good%20grasp%20on%20%27how%20to%20write%20code%27%2C%20but%20not%20always%20what%20to%20do%20with%20it%20once%20it%27s%20been%20written.%20This%20talk%20with%20delve%20into%20details%20about%20how%20to%20manage%20your%20codebase%2C%20and%20how%20to%20manage%20releases%20%28ofte" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;title=Code%20and%20Release%20Management" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F25%2Fcode-and-release-management%2F&amp;title=Code%20and%20Release%20Management" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/05/25/code-and-release-management/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/episode_022.mp3" length="128299389" type="audio/mpeg" />
		</item>
		<item>
		<title>The Elephpant Challenge – Winners and Results</title>
		<link>http://techportal.ibuildings.com/2010/05/17/the-elephpant-challenge-winners-and-results/</link>
		<comments>http://techportal.ibuildings.com/2010/05/17/the-elephpant-challenge-winners-and-results/#comments</comments>
		<pubDate>Mon, 17 May 2010 13:56:27 +0000</pubDate>
		<dc:creator>Ivo Jansch</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[elephpant]]></category>
		<category><![CDATA[travelling salesman]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=1971</guid>
		<description><![CDATA[We recently wrapped up the Ibuildings Elephpant Challenge, a contest where a PHP Elephpant traveled around the world visiting a given set of landmarks. Contestants had to write a script that calculated the shortest route for the Elephpant. The contest has several side goals: entries were not not only validated against the given landmarks and [...]]]></description>
			<content:encoded><![CDATA[<p>We recently wrapped up the Ibuildings Elephpant Challenge, a contest where a <A href="http://www.flickr.com/search/?q=elephpant&#038;w=all&#038;s=int">PHP Elephpant</a> traveled around the world visiting a given set of landmarks. Contestants had to write a script that calculated the shortest route for the Elephpant. The contest has several side goals: entries were not not only validated against the given landmarks and a second secret set of landmarks, they also were scored based on their performance, code complexity and code size.</p>
<p>In this post, the winners will be announced and we will make some observations based on the contest. </p>
<p><span id="more-1971"></span></p>
<h3>The solution</h3>
<p>The shortest route based on the <a href="http://www.ibuildings.com/downloads/challenge/elephpant_landmarks.csv">given CSV file</a> is <strong>41799 kilometers and 231 meters</strong>, calculated with the Haversine Formula. The route is: Big Ben; Area 51; Zendcon; Golden Gate Bridge; Sydney Opera; Harbour, Tokyo; Mount Everest; Taj Mahal, Eiffeltower; Elephpant Heaven.</p>
<p>The secret CSV file we used can be <a href="http://www.ibuildings.com/downloads/challenge/elephpant_landmarks_secret.csv">found here</a>. The shortest route now is <strong>48701 km and 353 meters</strong> (Sheffield; php|tek; Mexico City; Apple Cupertino; Vancouver; Hawaii; Chinese Wall; Cape Town; Tower of Pisa; Manneke Pis).</p>
<h3>The Winners</h3>
<p>Let us have a look at the winners. We had 3 categories; Junior developers, Medium developers and Senior developers. The contest was apparently harder than we anticipated because none of the junior candidates managed to find the correct distance. Two candidates came really close (Elias Sorensen and Matthew Haynes at 42089 and 42090 km on the initial CSV respectively).</p>
<p>In the medium category, there were a few candidates that had the initial CSV right, but only one candidate that also had the correct solution to the secret CSV file. Since we only score on performance, complexity and code size among the candidates with the right solution (see further down for a few observations on this), this person automatically became the winner:</p>
<p>Category Winner Medium: <strong>Andy Thompson</strong></p>
<p>Andy&#8217;s average performance on 10 landmarks was 333.79 seconds and he used 38 lines of code. </p>
<p>In the senior category, we had many more correct solutions and a variety of algorithms. The top 5 entries with the correct routes:</p>
<table border="1">
<tr>
<th>Contestant</th>
<th>Performance / Complexity / Lines of Code</th>
<th>Total score</th>
</tr>
<tr>
<td>1. <strong>Michiel Brandenburg</strong></td>
<td>50.25 seconds / 14 / 46</td>
<td>26</td>
</tr>
<tr>
<td>2. Remi Woler</td>
<td>11.05 seconds / 19 / 125</td>
<td>23</td>
</tr>
<tr>
<td>3. Joris van de Sande</td>
<td>69.91 seconds / 14 / 48</td>
<td>22</td>
</tr>
<tr>
<td>4. Ben Spencer</td>
<td>19.98 seconds / 28 / 61 </td>
<td>20</td>
</tr>
<tr>
<td>5. Bastian Gorke</td>
<td>68.99 seconds / 30 / 164</td>
<td>14</td>
</tr>
</table>
<p>Among the 2 category winners we raffled an iPad and a ticket to the <a href="http://phpconference.nl">Dutch PHP Conference</a>. Michiel won the iPad, Andy won the DPC ticket.</p>
<h3>Observations</h3>
<p>We made a few observations when evaluating the contest and we thought we&#8217;d share them.</p>
<p><strong>Adhering to specifications</strong><br />
We automated the test so that we could easily produce results. To do this we had very specific requirements; the script should be called &#8216;contest.php&#8217;, accept 1 command line input parameter indicating the input CSV file, and required the output to be a list of landmark names, one on each line.</p>
<p>It is amusing to see that we received scripts called index.php or ibuildings.php, scripts that had CSV output, and we even received two scripts that given a CSV file of 10 landmarks, would produce a route that would only visit 9 of them. True; elephpants are picky when it comes to choosing places to visit, but the elephpant was required to visit them all. This should not be a problem for an elephpant, especially with landmarks such as Elephpant Heaven in the list; interesting that nobody wondered what Elephpant Heaven is. You will see what we meant when you&#8217;re around; it&#8217;s not far from the Dutch PHP Conference venue. </p>
<p><strong>Making choices</strong><br />
We noted that Remi was almost twice as fast as Ben, and 5 times faster than Michiel, but complexity and code size were just as important and since Michiel had top score in both categories, he became the overall winner. When I look at the various entries, it&#8217;s striking that almost everybody chose to optimize performance as if that were the main goal; I guess it&#8217;s more fun to focus on performance. Some candidates used really really fast algorithms (producing results at around 0.24 seconds for both CSV files!), but those algorithms did not guarantee accurate results (ranging from &#8216;close&#8217; at 42090km to &#8216;very wrong&#8217; at 76536km. In a real world situation those algorithms might be the best choice if performance is essential and accuracy is not required. In our case however we mentioned that winners must produce the correct result; a requirement like that should be key in selecting an approach to any software problem.</p>
<p><strong>Secrets</strong><br />
The reason we used a secret CSV file to validate the entries was to prevent optimizations that were aware of the route; this proved to be useful since there were indeed contestants that had a very fast correct solution but only because they had knowledge about the landmarks and had for example &#8216;started their elephpant in a certain direction&#8217;. These contestants fell through on the secret CSV file, where they were still performing very fast but not producing the shortest route.</p>
<p><strong>The Traveling Salesman</strong><br />
Most contestants had recognized immediately that this problem is essentially the <a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem">&#8216;Traveling Salesman Problem&#8217;</a>, which is used in many computer science courses to teach algorithms and optimization. </p>
<p>We had entries from every country in Europe, still it&#8217;s intersting to note that the top 3 were all Dutch candidates. Maybe the Dutch have more traveling salesmen? :)</p>
<p><strong>Running a contest can be hard!</strong><br />
One observation was that we completely underestimated the time it would take to get the results. While some had written very efficient algorithms, others had chosen brute force attacks that ran for quite a while. Since we wanted to get accurate timing results, we ran scripts multiple times and calculated averages. After the first run had run for 3 days and still only had 25% of the entries processed, I changed the script to not run multiple times if the initial result wasn&#8217;t under 3 minutes. It eventually still took my test server a few days to go over all the entries.</p>
<p>Although we did not state how many landmarks there would be in the secret CSV file, a larger file could have made the contest virtually impossible. To illustrate how brute force solutions are very difficult to scale: a script that would run for 3 minutes on 10 landmarks could run for 3 hours with just 2 landmarks more.</p>
<p>Another difficulty was the lines of code count and the complexity numbers. We used proper tools to generate the numbers, but the lines of code counter we used would ignore files called .inc and the complexity calculator would ignore code not in a function and so on. So we had to fiddle quite significantly to get accurate numbers there. A lesson for future contests.</p>
<h3>Conclusion</h3>
<p>For us as organizers, this was a fun challenge, and seeing the buzz on Twitter surrounding the contest it certainly seems the contestants had fun as well.</p>
<p>Let me finish up by saying: Winners: congratulations! And everybody else, thanks for participating, I hope you had fun!</p>
<p>In the meantime the next challenge, dubbed the Test Driven Challenge, has been launched; develop a class that satisfies a given set of testcases. <a href="http://www.ibuildings.com/challenge">This new challenge</a> will run until June 30 and the prize is once more an iPad. This one is slightly easier than the previous challenge, to give the junior and medium developers another shot at the iPad!</p>
<p>Have fun!</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;t=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;title=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results&amp;bodytext=We%20recently%20wrapped%20up%20the%20Ibuildings%20Elephpant%20Challenge%2C%20a%20contest%20where%20a%20PHP%20Elephpant%20traveled%20around%20the%20world%20visiting%20a%20given%20set%20of%20landmarks.%20Contestants%20had%20to%20write%20a%20script%20that%20calculated%20the%20shortest%20route%20for%20the%20Elephpant.%20The%20contes" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;title=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;title=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results&amp;notes=We%20recently%20wrapped%20up%20the%20Ibuildings%20Elephpant%20Challenge%2C%20a%20contest%20where%20a%20PHP%20Elephpant%20traveled%20around%20the%20world%20visiting%20a%20given%20set%20of%20landmarks.%20Contestants%20had%20to%20write%20a%20script%20that%20calculated%20the%20shortest%20route%20for%20the%20Elephpant.%20The%20contes" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;title=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=We%20recently%20wrapped%20up%20the%20Ibuildings%20Elephpant%20Challenge%2C%20a%20contest%20where%20a%20PHP%20Elephpant%20traveled%20around%20the%20world%20visiting%20a%20given%20set%20of%20landmarks.%20Contestants%20had%20to%20write%20a%20script%20that%20calculated%20the%20shortest%20route%20for%20the%20Elephpant.%20The%20contes" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;title=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F17%2Fthe-elephpant-challenge-winners-and-results%2F&amp;title=The%20Elephpant%20Challenge%20-%20Winners%20and%20Results" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/05/17/the-elephpant-challenge-winners-and-results/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>State &amp; Ajax – How to Maintain Browser and Application State in an Asynchronous World</title>
		<link>http://techportal.ibuildings.com/2010/05/11/state-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world/</link>
		<comments>http://techportal.ibuildings.com/2010/05/11/state-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world/#comments</comments>
		<pubDate>Tue, 11 May 2010 08:00:49 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[paul reinheimer]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=1389</guid>
		<description><![CDATA[Speaker: Paul Reinheimer This talk will examine the two greatest problems in Ajax development (except for that pesky browser issue): Exactly what that “Asynchronous” word means, what problems it creates, and how they can be effectively managed, next the YUI Browser History object will be examined, finally handing control of Ajax applications back to the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/dpc-podcast.jpg" align="left" width="15%" style="margin:10px;"/>Speaker: <a href="http://blog.preinheimer.com/">Paul Reinheimer</a><br />
This talk will examine the two greatest problems in Ajax development (except for that pesky browser issue): Exactly what that “Asynchronous” word means, what problems it creates, and how they can be effectively managed, next the YUI Browser History object will be examined, finally handing control of Ajax applications back to the user via their familiar back button.</p>



Like it? Share it!


	<a rel="nofollow"  href="mailto:?subject=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20&amp;body=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F" title="email"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20%20-%20http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F" title="Twitter"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;t=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20" title="Facebook"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;title=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20&amp;bodytext=Speaker%3A%20Paul%20Reinheimer%0D%0AThis%20talk%20will%20examine%20the%20two%20greatest%20problems%20in%20Ajax%20development%20%28except%20for%20that%20pesky%20browser%20issue%29%3A%20Exactly%20what%20that%20%E2%80%9CAsynchronous%E2%80%9D%20word%20means%2C%20what%20problems%20it%20creates%2C%20and%20how%20they%20can%20be%20effectively%20managed%2C%20" title="Digg"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;title=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20" title="StumbleUpon"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;title=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20&amp;notes=Speaker%3A%20Paul%20Reinheimer%0D%0AThis%20talk%20will%20examine%20the%20two%20greatest%20problems%20in%20Ajax%20development%20%28except%20for%20that%20pesky%20browser%20issue%29%3A%20Exactly%20what%20that%20%E2%80%9CAsynchronous%E2%80%9D%20word%20means%2C%20what%20problems%20it%20creates%2C%20and%20how%20they%20can%20be%20effectively%20managed%2C%20" title="del.icio.us"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;title=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20&amp;source=techPortal+Tutorials+for+better+PHP&amp;summary=Speaker%3A%20Paul%20Reinheimer%0D%0AThis%20talk%20will%20examine%20the%20two%20greatest%20problems%20in%20Ajax%20development%20%28except%20for%20that%20pesky%20browser%20issue%29%3A%20Exactly%20what%20that%20%E2%80%9CAsynchronous%E2%80%9D%20word%20means%2C%20what%20problems%20it%20creates%2C%20and%20how%20they%20can%20be%20effectively%20managed%2C%20" title="LinkedIn"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;title=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20" title="Reddit"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F" title="Technorati"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2010%2F05%2F11%2Fstate-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world%2F&amp;title=State%20%26%20Ajax%20-%20How%20to%20Maintain%20Browser%20and%20Application%20State%20in%20an%20Asynchronous%20World%20" title="DZone"><img src="http://techportal.ibuildings.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2010/05/11/state-ajax-how-to-maintain-browser-and-application-state-in-an-asynchronous-world/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
<enclosure url="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/episode_010.mp3" length="42781663" type="audio/mpeg" />
		</item>
	</channel>
</rss>
