<?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>Fri, 11 May 2012 10:42:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</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>DPC Ticket Winner Announced</title>
		<link>http://techportal.ibuildings.com/2012/05/11/dpc-ticket-winner-announced/</link>
		<comments>http://techportal.ibuildings.com/2012/05/11/dpc-ticket-winner-announced/#comments</comments>
		<pubDate>Fri, 11 May 2012 10:28:38 +0000</pubDate>
		<dc:creator>Lorna Mitchell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[dpc12]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3786</guid>
		<description><![CDATA[We are delighted to announce that our competition winner is Christian Schorn! Christian wins a pass which gives him access to the conference sessions for both DPC (Dutch PHP Conference) and DMC (Dutch Mobile Conference). Thanks to everyone who left awesome comments on the post, we loved hearing your stories! If you didn't win, we [...]]]></description>
			<content:encoded><![CDATA[<p>We are delighted to announce that our competition winner is Christian Schorn! Christian wins a pass which gives him access to the conference sessions for both DPC (Dutch PHP Conference) and DMC (Dutch Mobile Conference).</p>
<p>Thanks to everyone who left awesome comments on the post, we loved hearing your stories! If you didn't win, we still have some places available, so <a href="http://dpc12.paydro.net">buy your tickets </a>and we'll see you there!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F&amp;title=DPC+Ticket+Winner+Announced" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F&amp;title=DPC+Ticket+Winner+Announced" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F&amp;title=DPC+Ticket+Winner+Announced" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F&amp;headline=DPC+Ticket+Winner+Announced" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Ticket+Winner+Announced&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Ticket+Winner+Announced&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Ticket+Winner+Announced&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Ticket+Winner+Announced&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Ticket+Winner+Announced&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F&amp;title=DPC+Ticket+Winner+Announced&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F11%2Fdpc-ticket-winner-announced%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/05/11/dpc-ticket-winner-announced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conference Report: Whisky Web</title>
		<link>http://techportal.ibuildings.com/2012/05/09/conference-report-whisky-web/</link>
		<comments>http://techportal.ibuildings.com/2012/05/09/conference-report-whisky-web/#comments</comments>
		<pubDate>Wed, 09 May 2012 10:16:40 +0000</pubDate>
		<dc:creator>Marco De Bortoli</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[whiskyweb]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3775</guid>
		<description><![CDATA[Whisky Web is a brand new, fresh conference and the 2012 edition was the inaugural event, with hopefully many more to follow. This event has some familiar names from the PHP community behind it, Juozas "Joe" Kaziukėnas and his helpers Michael Maclean, Max Manders, Dale Harvey and Paul Dragoonis. The opening keynote from Josh Holmes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://whiskyweb.co.uk" target="_blank">Whisky Web</a> is a brand new, fresh conference and the 2012 edition was the inaugural event, with hopefully many more to follow. This event has some familiar names from the PHP community behind it, <a href="http://juokaz.com/" target="_blank">Juozas "Joe" Kaziukėnas</a> and his helpers <a href="http://mgdm.net/" target="_blank">Michael Maclean</a>, <a href="http://maxmanders.co.uk/" target="_blank">Max Manders</a>, <a href="http://arandomurl.com/" target="_blank">Dale Harvey</a> and <a href="http://www.ppi.io/" target="_blank">Paul Dragoonis</a>.</p>
<p>The opening keynote from <a href="http://www.joshholmes.com/" target="_blank">Josh Holmes</a> was about learning how to fail, because everyone has to fail, not once but many times, because it's only by failing that we learn. So please never be afraid to make mistakes and never be afraid to ask for help. That's a great way to grow up personally and professionally in this industry.</p>
<p>In contrast, <a href="http://blog.wombert.de/" target="_blank">David Zuelke</a>'s closing keynote was deeply technical. He talked about RESTful web services and how to implement them. What I liked was the fact that in contrast to the current trend, where it seems JSON is the only answer to data transfer across web services and systems, David pushed heavily towards XML and the fact that XML is more descriptive and comprehensive than a JSON data structure. He made the important point that while XML can easily represent a JSON set of data, the opposite is not necessarily true.<br />
<span id="more-3775"></span></p>
<h3>1st talk - Estimation, or "How To Dig Your Own Grave"</h3>
<p><a href="http://merewood.org/" target="_blank">Rowan Merewood </a>is not only one of my colleagues but also one of my favourite speakers. He pointed out the most common attitudes towards estimation within companies in the past, and how this affects the estimation process and the likely consequences. He then gave some solutions, some different perspectives, explained how agile can help and why.</p>
<p>During the questions section this talk higlighted how managers, as well as developers, are interested in attending these events. I think this is a good indicator that the two worlds may yet converge  to a common point of understanding.</p>
<h3>2nd Talk - Essential Node.js For Web Developers</h3>
<p><a href="http://amundsen.com/" target="_blank">Mike Amundsen</a> has all my appreciation for delivering a really comprehensive talk about Node.js. He demonstrated practical usage of Node.js in the web ecosystem, using it to render web pages and forms.   He also gave insight on how to deal with getting and posting requests and even how to handle file uploads and downloads and content streaming. This talk drew on the personal experience of one person and transformed it to motivate people to have a deeper look at Node.js and its capabilities.  Thumbs up for Mike and for Node.js.</p>
<h3>3rd Talk - The Emperor's New Clothes</h3>
<p><a href="http://kevinjohngallagher.com/" target="_blank">Kevinjohn Gallagher</a>'s talk was a very good one, but at the same time probably the one I liked the least, simply because his topic was huge and we ended up overlooking and passing very quickly through some slides that in my opinion deserved more time and attention. In an era where everyone talks about new methodology, innovation, HTML5, responsive design and everything other thing that pops into your head when you think about what are the current technical hypes, Kevinjohn explained how this rush to a brave new world is not always helpful. He presented evidence showing that often,  this tendency to upgrade and change technologies is quite unnecessary.  It does not benefit the end user, it's a huge investment for a company, and sometimes it is done just for the "fun" of it.</p>
<h3>4th Talk - Lessons Learned From Testing Legacy Code</h3>
<p><a href="http://jmertic.wordpress.com/" target="_blank">John Mertic</a> covered another very interesting topic that has touched me personally in the last few years of my career. Generally, when you go to conferences or you work abroad or you do consultancy you meet either of two scenarios: The first scenario is that of the cool people talking about testing and best practices. The second, more common, scenario is where unit test coverage is thin, where  the software is badly designed, and the basic principles of object orientation are just a dream! John refreshed our knowledge and skills on what the available tools are; how, when and why to use them in order to achieve good quality results. I'm sure this session was enlightening for many people because so much of what he covered seems unknown to so many developers.</p>
<h3>5th Talk - Is Your App Ready For The (Hybrid) Cloud?</h3>
<p><a href="http://blog.feryn.eu/" target="_blank">Thijs Feryn</a> is a proactive and engaging speaker, on the stage he tries to take the audience aboard with him in his adventure through the slides. He works for a hosting provider so getting in touch with architectural solutions and distributed systems seems to be a daily task. During his talk he described some of the cloud solutions that the current market has to offer. He talked about Amazon's Web Services, Microsoft's Azure platform, Orchestra's infrastructure and many more - giving a detailed overview of the pros and cons of every solution, depending on the requirements of your project. The Q&#038;A phase of this talk was full of interesting thoughts and possible solutions to investigate.</p>
<h3>Wrap up</h3>
<p>Attending a conference is absolutely key for any developer's professional career, knowledge and personal development, the return on your investment is very high and I cannot recommend strongly enough to people to attend a conference!  This particular conference had a nice format: one day of talks and one hackathon day.</p>
<p>At the social event on Friday, the conference was true to its name - we had a whisky tasting night.  This was the cherry on the cake and it allowed me to taste for the first time in my life a type of gin which I liked!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F&amp;title=Conference+Report%3A+Whisky+Web" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F&amp;title=Conference+Report%3A+Whisky+Web" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F&amp;title=Conference+Report%3A+Whisky+Web" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F&amp;headline=Conference+Report%3A+Whisky+Web" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Conference+Report%3A+Whisky+Web&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Conference+Report%3A+Whisky+Web&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Conference+Report%3A+Whisky+Web&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Conference+Report%3A+Whisky+Web&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Conference+Report%3A+Whisky+Web&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F&amp;title=Conference+Report%3A+Whisky+Web&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F05%2F09%2Fconference-report-whisky-web%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/05/09/conference-report-whisky-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DPC Radio: Keynote - The Art of the User Experience: making beautiful, delightful, fun things</title>
		<link>http://techportal.ibuildings.com/2012/04/27/dpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things/</link>
		<comments>http://techportal.ibuildings.com/2012/04/27/dpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 08:22:40 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[Aral Balkan]]></category>
		<category><![CDATA[dpc11]]></category>
		<category><![CDATA[inspiring]]></category>
		<category><![CDATA[keynote]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3398</guid>
		<description><![CDATA[Aral Balkan We are the makers of the new everyday things. We design and develop the virtual pens, telephones, newspapers, calendars, and door-handles that people interact with every single day. We are the virtual architects and the products that we design and develop have the power to determine whether people have a good day or [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Aral Balkan</strong></p>
<p>We are the makers of the new everyday things. We design and develop the virtual pens, telephones, newspapers, calendars, and door-handles that people interact with every single day. We are the virtual architects and the products that we design and develop have the power to determine whether people have a good day or a bad day.</p>
<p>In this session, Aral Balkan will outline the important role that user experience design plays in the making of virtual products and inspire you to see that it is your job – regardless of whether you make web sites, mobile apps, intranet systems, or ticket machines – to make this new world that we are crafting together not only usable and accessible but beautiful, fun, inspiring, pleasurable, delightful, and – dare I say – magical.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F&amp;title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F&amp;title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F&amp;title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F&amp;headline=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F&amp;title=DPC+Radio%3A+Keynote+-+The+Art+of+the+User+Experience%3A+making+beautiful%2C+delightful%2C+fun+things&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F27%2Fdpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/04/27/dpc-radio-keynote-the-art-of-the-user-experience-making-beautiful-delightful-fun-things/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_013.mp3" length="55836439" type="audio/mpeg" />
		</item>
		<item>
		<title>Want a DPC12 Ticket? Just ask!</title>
		<link>http://techportal.ibuildings.com/2012/04/25/want-a-dpc12-ticket/</link>
		<comments>http://techportal.ibuildings.com/2012/04/25/want-a-dpc12-ticket/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 08:09:06 +0000</pubDate>
		<dc:creator>Lorna Mitchell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Planet PHP]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[dmc12]]></category>
		<category><![CDATA[dpc12]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3751</guid>
		<description><![CDATA[Good news! We've managed to acquire a conference ticket for the Dutch PHP Conference in Amsterdam, on June 8th and 9th, to give away to our readers. We know that since you're reading techPortal, you are interested in technology in general and probably PHP in particular. The Dutch PHP Conference is one of the leading [...]]]></description>
			<content:encoded><![CDATA[<p></a>Good news!  We've managed to acquire a conference ticket for the <a href="http://www.phpconference.nl/">Dutch PHP Conference</a> in Amsterdam, on June 8th and 9th, to <strong>give away to our readers</strong>.  We know that since you're reading techPortal, you are interested in technology in general and probably PHP in particular.  The Dutch PHP Conference is one of the <strong>leading european conferences</strong> for PHP content and we hope you can join us there!</p>
<p>This year, we're running a sister conference alongside DPC - the very first <a href="http://www.mobileconference.nl/">Dutch Mobile Conference</a> is being held!  Your DPC ticket also gives you access to the mobile conference tracks, so whether you're into <strong>web, mobile, or a little bit of both</strong> - you're absolutely in the right place :)</p>
<p><a href="http://phpconference.nl"><img src="http://techportal.ibuildings.com/wp-content/uploads/2012/04/dpc_block-300x174.png" alt="" title="dpc_block" width="300" height="174" class="alignnone size-medium wp-image-3754" /></a>&nbsp;&nbsp;&nbsp;<a href="http://mobileconference.nl"><img src="http://techportal.ibuildings.com/wp-content/uploads/2012/04/dmc_block-300x159.png" alt="" title="dmc_block" width="300" height="159" class="alignnone size-medium wp-image-3758" /></a></p>
<p>We have some excellent speakers lined up for both conferences; check out the <a href="http://www.mobileconference.nl/schedule">mobile conference schedule</a> and the <a href="http://www.phpconference.nl/schedule">PHP conference schedule</a> to see what kinds of sessions are available.</p>
<h3>How to Win the Ticket</h3>
<p>We're keeping it nice and simple!  To win, simply leave us a comment on this post (including your email address so we can get in touch with you if you win!) telling us why you should win the ticket, and we'll randomly draw a winner when we <strong>close the competition on May 9th</strong>.  Want to join us in Amsterdam?  Then what are you waiting for?</p>
<p><i>(sadly we haven't got enough tickets to give away to everyone, so if you don't win then you can still <a href="http://dpc12.paydro.net/">buy tickets</a> and we'll see you there!)</i></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F&amp;title=Want+a+DPC12+Ticket%3F+Just+ask%21" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F&amp;title=Want+a+DPC12+Ticket%3F+Just+ask%21" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F&amp;title=Want+a+DPC12+Ticket%3F+Just+ask%21" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F&amp;headline=Want+a+DPC12+Ticket%3F+Just+ask%21" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Want+a+DPC12+Ticket%3F+Just+ask%21&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Want+a+DPC12+Ticket%3F+Just+ask%21&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Want+a+DPC12+Ticket%3F+Just+ask%21&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Want+a+DPC12+Ticket%3F+Just+ask%21&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Want+a+DPC12+Ticket%3F+Just+ask%21&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F&amp;title=Want+a+DPC12+Ticket%3F+Just+ask%21&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F25%2Fwant-a-dpc12-ticket%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/04/25/want-a-dpc12-ticket/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Sismo Challenge: Results</title>
		<link>http://techportal.ibuildings.com/2012/04/17/sismo-challenge-results/</link>
		<comments>http://techportal.ibuildings.com/2012/04/17/sismo-challenge-results/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 08:26:59 +0000</pubDate>
		<dc:creator>Marcello Duarte</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[sismo]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3700</guid>
		<description><![CDATA[We recently wrapped up the first Ibuildings Challenge of 2012; a contest to create a Sismo notifier. At the moment Sismo ships with Growl, DBus, Google Talk and XMPP notifiers. They all extend the Sismo\Notifier to provide feedback to developers in a particular way. The task was to create a new notifier that was useful, [...]]]></description>
			<content:encoded><![CDATA[<p>We recently wrapped up the first Ibuildings Challenge of 2012; a contest to create a <a href="http://sismo.sensiolabs.org/">Sismo</a> notifier. At the moment Sismo ships with Growl, DBus, Google Talk and XMPP notifiers. They all extend the <code>Sismo\Notifier</code> to provide feedback to developers in a particular way. The task was to create a new notifier that was useful, creative or inspiring. This post announces the winners and makes some observations based on the submissions we received.<span id="more-3700"></span></p>
<h3>Contest Key Rules: A Recap</h3>
<ul>
<li>You should follow the Symfony code standards as described <a href="http://symfony.com/doc/current/contributing/code/standards.html" target="_blank">here</a>.</li>
<li>Your script will be run on PHP 5.3.5 installation. Should you need any PHP extension you must provide a patch to the <code>php.ini</code> with the changes made to add the extensions you've used.</li>
<li>In the spirit of Sismo itself, we'd prefer self-contained solutions. Use Symfony or PHP extensions if you need to, and other frameworks if you must!</li>
<li>The name of the PHP class doesn't matter, but it must extend <code>Sismo\Notifier</code> and implement the <code>notify()</code> method.</li>
<li>You can look at existing Sismo notifiers to see implementation examples, but you cannot implement the same notifier in a different way, e. g. you cannot implement a Growl notifier which is already in master. You can find more instructions on how to extend the notifier on Sismo documentation. It can be found in <a href="http://sismo.sensiolabs.org/" target="_blank">sismo.sensiolabs.org</a> or <a href="https://github.com/fabpot/Sismo" target="_blank">github.com/fabpot/Sismo</a> under “Adding a notifier”.</li>
</ul>
<p><br/></p>
<h3>Competition Entries</h3>
<p>We created 3 categories; creative, inspiring and useful notifiers. None of the submissions selected a category, so we chose the category we thought best described the submission. We received a total of 23 subscriptions, but only 14 of those actually submitted their code or a link to an existing repository.</p>
<h3>Winners</h3>
<p>The competition was designed to inspire developers to contribute to open source projects. We specifically chose a tool that requires existing unit tests for you to use it – a continuous testing tool - to encourage contestants to write tests. Above all, I hope you have enjoyed taking part in this contest. Now, let's look at the <b>winners</b></p>
<h4>Useful</h4>
<p>Considering Sismo is meant to run locally we chose a Wallpaper Notifier as the most useful. It shows the build result as a small bar added to the desktop wallpaper. This is a very customisable solution; you have control over colours, the size of the final wallpaper considering the screen resolution, and a bunch of other options. The added documentation was also very good.</p>
<p><b>Category Winner Useful:</b> Wallpaper Notifier by Javier Eguiluz</p>
<h4>Inspiring</h4>
<p>I have noticed that it has become common in some IRC channels to have a bot notifying the chat participants of the commits as they happen. One of the most popular of these bots is <a href="http://www.eggheads.org" title="Eggdrop">Eggdrop</a>. So we picked an Eggdrop Notifier for the inspiring category. This would be particularly inspiring in open source projects that are just starting to build a community. The participants could see what the selected developers were working on locally.</p>
<p><b>Category Winner Inspiring:</b> Eggdrop Notifier by Andrew Graham</p>
<h4>Creative</h4>
<p>We had a few submissions of notifiers that would speak the test results, but this one made me laugh. I guessed immediately what it was because of its name, but still it was very funny when it ran with a failed build: "Houston, we have a problem here!", it said. Nice, funny, creative and original.</p>
<p><b>Category Winner Creative:</b> Houston Notifier by Andreas Hucks</p>
<h3>Prizes</h3>
<p>Amongst all the winners, we raffled three prizes: 2 tickets to the <a href="http://conference.phpnw.org.uk/phpnw12/">PHPNW Conference</a> and an <a href="http://www.apple.com/ipad">Apple iPad</a>. The prizes go as follows:</p>
<p><b>PHPNW tickets:</b> Andrew Graham and Andreas Hucks<br />
<b>iPad:</b> Javier Eguiluz</p>
<p>Congratulations to all the winners!</p>
<h3>Conclusions</h3>
<p>For us as organisers, this has been another fun challenge and we look forward to the next (watch this space!). We offer our warm congratulations to all our participants for such a high standard of submissions, and especially to our winners who fought off some stiff competition to emerge victorious. Thanks to all of you and we hope you had as much fun as we did!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F&amp;title=Sismo+Challenge%3A+Results" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F&amp;title=Sismo+Challenge%3A+Results" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F&amp;title=Sismo+Challenge%3A+Results" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F&amp;headline=Sismo+Challenge%3A+Results" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Sismo+Challenge%3A+Results&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Sismo+Challenge%3A+Results&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Sismo+Challenge%3A+Results&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Sismo+Challenge%3A+Results&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Sismo+Challenge%3A+Results&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F&amp;title=Sismo+Challenge%3A+Results&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F17%2Fsismo-challenge-results%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/04/17/sismo-challenge-results/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>DPC Radio: TDD and Getting Paid</title>
		<link>http://techportal.ibuildings.com/2012/04/10/dpc-radio-tdd-and-getting-paid/</link>
		<comments>http://techportal.ibuildings.com/2012/04/10/dpc-radio-tdd-and-getting-paid/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 12:44:16 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[Rowan Merewood]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test-driven development]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3407</guid>
		<description><![CDATA[Rowan Merewood Test-driven development is generally regarded as a good move: it should result in simple decoupled design, your tests tend to cover behaviour not methods, and far fewer bugs. However, just getting unit tests in on a real, commercial project is hard - switching to TDD is even harder. Defining concrete answers to a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Rowan Merewood</strong></p>
<p>Test-driven development is generally regarded as a good move: it should result in simple decoupled design, your tests tend to cover behaviour not methods, and far fewer bugs. However, just getting unit tests in on a real, commercial project is hard - switching to TDD is even harder. Defining concrete answers to a problem is hard and can be difficult to integrate into Often you can start a project with good intentions and coverage, then the deadline looms and the tests go out then the hacks come in. So, instead of beating ourselves up about not being perfect let's look at an interactive approach to adopting TDD principles. We'll look at tactics for selling TDD to your client, boss and colleagues. This talk will also cover methods for making TDD easier for you by showing you what tools you can use to integrate it into your development environment. In the project itself, we'll examine how we can make small but permanent steps towards full TDD, without losing that progress when deadlines hit. We'll also cover a few methods for learning on your own time and how the whole process can actually be made quite enjoyable.</p>
<p>You can find <a href="http://www.slideshare.net/rowan_m/tdd-and-getting-paid">Rowan's slides on slideshare</a>.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F&amp;title=DPC+Radio%3A+TDD+and+Getting+Paid" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F&amp;title=DPC+Radio%3A+TDD+and+Getting+Paid" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F&amp;title=DPC+Radio%3A+TDD+and+Getting+Paid" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F&amp;headline=DPC+Radio%3A+TDD+and+Getting+Paid" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+TDD+and+Getting+Paid&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+TDD+and+Getting+Paid&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+TDD+and+Getting+Paid&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+TDD+and+Getting+Paid&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+TDD+and+Getting+Paid&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F&amp;title=DPC+Radio%3A+TDD+and+Getting+Paid&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F10%2Fdpc-radio-tdd-and-getting-paid%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/04/10/dpc-radio-tdd-and-getting-paid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_017.mp3" length="51177358" type="audio/mpeg" />
		</item>
		<item>
		<title>Agile Smells</title>
		<link>http://techportal.ibuildings.com/2012/04/02/agile-smells/</link>
		<comments>http://techportal.ibuildings.com/2012/04/02/agile-smells/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 09:21:15 +0000</pubDate>
		<dc:creator>Gordon Skinner</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[best practice]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3651</guid>
		<description><![CDATA[We all know that switching to Agile will solve all our problems. We can almost guarantee that adopting agile will be rewarded by a million per cent increase in productivity and ensure that we never miss a deadline ever again. It's all so fresh and buzzwordy - how can there be a downside? Unfortunately, as [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that switching to Agile will solve all our problems.  We can almost guarantee that adopting agile will be rewarded by a million per cent increase in productivity and ensure that we never miss a deadline ever again.  It's all so fresh and buzzwordy - how can there be a downside?</p>
<p>Unfortunately, as with everything, this is not quite the case.  Agile when utilised properly can have a positive effect on productivity, it can go some way to helping make deadlines easier to hit.  But when used badly, it can have completely the opposite effect.</p>
<p>There are a number of problems, or 'smells', we have identified in the Agile process that could be having a negative impact on all your good intentions.  Here we outline some of the smells you may find in various elements of the agile process and give you some tips on how to spot and eradicate them.<span id="more-3651"></span></p>
<h4>The Agile Process</h4>
<p>This document anticipates a certain knowledge and experience of Agile, and so will not go into any depth explaining the processes and ceremonies of Agile.  If you are looking for more of an introduction to Agile  excellent guides can be found <a href="http://www.allaboutagile.com/what-is-agile-10-key-principles/" title="What is Agile" target="_blank">here</a> and <a href="http://martinfowler.com/agile.html" title="Martin Fowler Agile" target="_blank">here</a></p>
<h3>Sprint Planning Smells</h3>
<p>The Sprint planning session, or sessions depending on how you approach it, is the foundation upon which you build the entire sprint.  Any problems at this point in the process could be setting you up for failure before you even get started.  Here are a few problems we have seen that can arise during these meetings.</p>
<h4>Hit By A Bus</h4>
<p><em>"I know exactly how to do that, give it to me and it's a 1 pointer"</em></p>
<p>There are always going to be developers who have more knowledge of certain areas of the application.  The clichéd hit by a bus scenario, however, is a genuine risk; what if, once this 1 point story is added to the sprint, the "expert" developer is unavailable to do it?  All of a sudden this story becomes a lot more complex due to having to find your way round code you don't know so well.</p>
<p>Tip:</p>
<ul>
<li>Estimate every story as if you will be doing it</li>
</ul>
<p></p>
<h4>Swayed By Giants</h4>
<p><em>"They said it's a 1 point story, so I'm going to go with 1 point as well"</em></p>
<p>Every team is going to have a mixture of personalities and abilities, unfortunately this leads to a situation whereby some developers are reluctant to make their own estimates and instead allow their decision to be influenced by the stronger developers.  The knock on effect is that the estimates are really only being done by one or two developers as the rest just agree.  However the work is spread across the team, so these underestimated stories find themselves in the hands of developers who, while not estimating the story highly, believe it to be harder than their estimate.</p>
<p>Tips:</p>
<ul>
<li>As above, estimate every story as if you will be doing it</li>
<li>If using planning poker cards, ensure everyone places the card face down first, ensuring that the initial estimate can not be influenced by others</li>
</ul>
<p></p>
<h4>Fuzzy Definition of Done</h4>
<p><em>"That's only 2 lines of code, it's a 1 point story"</em></p>
<p>It may well be the case that the development of the story is trivial.  But those 2 lines may be in such a core part of the architecture that the QA effort required to validate it will take days and days.  With a formally defined <a href="http://www.gettingagile.com/2007/10/05/building-a-definition-of-done/" title="Definition of Done" target="_blank">Definition of Done</a>, this can outline the steps required before a story can be marked complete.  One of the key aspects of that should be, I am confident this code could go to production now.</p>
<p>Tips:</p>
<ul>
<li>Create a formal Definition of Done for the project</li>
<li>When estimating estimate against this definition of done, not merely the development effort required</li>
</ul>
<p></p>
<h4>Anonymous Author's task</h4>
<p><em>"As a user I need better reporting".</em></p>
<p>We have all seen stories that look a little like this.  The problem is that this makes perfect sense to the author, but little sense to anyone else.  If the author is unavailable during the planning poker session then you are left with two, fairly undesirable, options.  You can either reject the story outright, citing a lack of detail.  This is probably the better option here in order to protect the sprint, however it does go against the philosophy that we are all working together.  The other option is to try to guess what you think the author wanted and estimate that.  Which could threaten the sprint once it gets accepted if you have misinterpreted the story, particularly if underestimated</p>
<p>Tips:</p>
<ul>
<li>Ensure that stories go through a validation process before they reach the Planning Poker session.  This can help avoid vague or incomplete stories reaching the session.</li>
<li>If possible try to ensure that the author of the story is present in the session to answer any further questions about it</li>
</ul>
<p></p>
<h4>Premature Architecture</h4>
<p><em>"We could implement a simple form here, but we'll have to be wary of SQL Injection"</em></p>
<p>It really is no bad thing to be wary of SQL Injection, in fact it is to be positively encouraged.  However this is not the forum to be having these kind of discussions.  At this moment all we need to understand is how complex this story is, and thus how much relative effort will be required to complete it.</p>
<p>On occasion the manner in which the story will be tackled will need to be defined early, for example the problem could be solved by hardcoding a value in a page, or by creating an editable admin form.  Clearly here the approach taken influences the estimate, but ideally this knowledge will be known before the planning poker session</p>
<p>Tips:</p>
<ul>
<li>Attempt to vet potentially contentious stories before they reach the planning poker session</li>
<li>Consider the complexity of the solution, but not the finer details of it</li>
</ul>
<p></p>
<h4>Ramble on</h4>
<p><em>"I think we should consider…  then of course we need … but what about the case … then users in Tibet might find …"</em></p>
<p>Often in your planning poker session there will be a number of stories requiring estimation.  Occasionally you will find the sort of scenario described above where the requirements are not quite specific enough and so the discussion goes back and forward with lots of questions and answers which either stretch this session out for longer than it needs to be, or meaning that some stories don't get estimated as the time runs out</p>
<p>Tips:</p>
<ul>
<li>Ensure stories are clearly defined to avoid this kind of waffle</li>
<li>Timebox each story, if an estimate can't be reached in a reasonable amount of time then there are issues with the story</li>
</ul>
<p></p>
<h3>Standup Smells</h3>
<p>The standup can be a somewhat misunderstood part of the sprint process.  A common misconception is that each of the team members are reporting back on what they have been doing to their "superiors".  In fact it is quite the opposite, and should be viewed as such.  The team is working towards a common goal, and the standup is the ideal opportunity to ensure that as a team you still are on course to reach that target.  You are not reporting upwards, but rather sideways, ensuring that your team members are up to date with how the sprint is progressing from your point of view, while finding out how the sprint is progressing rom their point of view.  Problems identified early, in this forum can be handled with a team effort ensuring any blockers get prioritised for the team's common good.  This leads us to our first standup smell.</p>
<h4>Scrum Master Centred</h4>
<p><em>"Yesterday I worked on X, today I will work on Y"</em></p>
<p>It's not clear from the above quote (I couldn't think of one that worked!), but the inference here is that the team member is ‘reporting' on their day's work to the Scrummaster, or Product Owner.  The important thing to remember in the daily standup is that it is a forum for information sharing amongst the team.  Not a mechanism for people keeping track on your progress.</p>
<p>Tip:</p>
<ul>
<li>Attempt to look at every single team member while you are giving your update</li>
</ul>
<p></p>
<h4>Turn Up, Tune In, Drop Out</h4>
<p><em>"what, er, me? Oh ok.  Er, yesterday I …"</em></p>
<p>Possibly as a consequence of the previous smell, namely Scrum Master Centered, because people treat the meeting as reporting to their ‘superior', you quite often see the consequence is that people are essentially just waiting their turn to speak and not paying attention to the remainder of the team.</p>
<p>Tips:</p>
<ul>
<li>Mix up the order, perhaps using a ball, or other similar object, that the team pass to each other in a completely random order.  This way anyone could be called upon to speak at any point.</li>
<li>Remember this is much about you learning what your teammates are doing, as them finding out what you have been doing.</li>
</ul>
<p></p>
<h4>Ramble On</h4>
<p><em>"So I started looking at … then I thought I might try  … it didn't do what I thought, but that was interesting … then it turned out that …"</em></p>
<p>This is not the forum to elaborate extensively on a particular thing you were working on, or a particular problem you faced.   The standup is supposed to be a very short meeting, hence standing up for it.  The 3 main questions each person should answer in a stand up are traditionally, "What I did yesterday", "What I'll do today" and "Is anything blocking me".  You should be able to get through those in under 30 seconds</p>
<p>Tips:</p>
<ul>
<li>Timebox each speaker</li>
<li>Try to make your points concisely</li>
<li>If necessary, have a further conversation with relevant members of the team outside of the standup environment</li>
</ul>
<p></p>
<h4>Hidden Impediment</h4>
<p><em>"Today I'll work on story Y, should take a few hours"</em></p>
<p><em>"Yesterday I worked on Story Y, I'll keep doing that today"</em></p>
<p><em>"Yesterday I was still on story Y, today I'll keep at it"</em></p>
<p>You'll notice here that on the first day, the developer mentioned that he anticipated finishing the story within a few hours, yet 3 days later is still plugging away at it.  This suggests that something unanticipated has come up and is getting in the way of the developer who, in this instance, instead of asking for assistance is doggedly working away at the task in hand.  Clearly now this developer is behind schedule (having spent 2 unanticipated days working on this problem) and the knock on effect is that the sprint itself could be in danger.</p>
<p>Tip:</p>
<ul>
<li>Alter the language of the daily standup questions slightly, from what I will work on, to what I will achieve.  This way, in the scenario above, the developer would have said on the first day that he would achieve story Y and when he hadn't on the second day it would be more obvious that there may be a problem with this story.</li>
</ul>
<p></p>
<h4>Off Topic</h4>
<p><em>"Did you see the football game / reality show result / interesting phenomenon last night?"</em></p>
<p>It may well be that the football game / reality show / phenomenon was the most fascinating thing to happen to the planet this millennium.  But there will be all the time in the world after the standup to discuss it.  The standup should be focused entirely on the sprint progress.</p>
<p>Tip:</p>
<ul>
<li>Stay on topic</li>
</ul>
<p></p>
<h4>Memory Problems</h4>
<p><em>"I can't remember what I was working on yesterday, but today I'll pick up some task"</em></p>
<p>This is particularly common on the first standup after the weekend!  These updates are of no use to anybody as they completely fail to address the overriding concern of the standup which is, "Are we still on track to deliver this sprint on time?" </p>
<p>Tip:</p>
<ul>
<li>Take 2 minutes before the stand up to reacquaint yourself with what you were working on, and what is likely to be your focus today</li>
</ul>
<p></p>
<h4>Problem Solving</h4>
<p><em>"What was in the error logs with that problem you have? "</em></p>
<p>It may well be the case that you are struggling with a particular problem, and you mention that as part of the standup.  The danger here is that the Standup gets taken over by an improptu problem solving exercise.  This may not sound like a bad thing, after all we have the team together why not utilise that fact to try to get to the heart of this problem?  The simple answer is that this is not the function of the standup, and it's rarely the case that the entire team needs to be involved in this subsequent discussion.  Identifying the problem, and identifying who can have input into the solution is the domain of the standup, but this actual discussion should then take place separately, allowing the standup to continue</p>
<p>Tip:</p>
<ul>
<li>Identify who can help solve the problem, then have a discussion after the standup</li>
</ul>
<p></p>
<h4>Talking Chicken *</h4>
<p><em>"When will this feature be ready to test, it really is critical to our business"</em></p>
<p>Anybody related to the project should be welcomed, indeed encouraged, to attend the standup.  However, as we have mentioned before, we need to remember the purpose of the standup and that is for the team to catch up with each other to get a sense of how the sprint is going.  Just as this is not the team members reporting to a scrum master, it is also not the team reporting to an external stakeholder.  An external stakeholder, such as a Product Owner, may be treated as a team member and provide an update of their own to the team, however they should not be given the licence to ask direct questions, such as "When will feature Z be ready", or more dangerously, "What if it worked that way instead…".  The dangers of this range from the standup losing its purpose, through to scope creep, which we shall touch on later in the article.</p>
<p>* See the analogy of the <a href="http://en.wikipedia.org/wiki/The_Chicken_and_the_Pig" title="chicken and the pig" target="_blank">chicken and the pig</a> for the reasoning behind the title here </p>
<h3>Sprint Smells</h3>
<p>Now that we have got planning out of the way, and are happily working through the backlog as a team there are still a number of smells that can arise which threaten the delivery of the sprint.  We analyse these in detail here.</p>
<h4>Gold Plating</h4>
<p><em>"I know how I can write this using [INSERT CODING TECHNIQUE DU JOUR]"</em></p>
<p>As developers we are always seeking a technical challenge, and ways to demonstrate our ability.  However if left unchecked, these desires can lead to us unwittingly putting the sprint under threat by adding unnecessary flourishes to otherwise trivial pieces of work.  As a deliberately ridiculous example, think of a story which has been raised to provide a couple of text changes to page on a website.  Having been bogged down with stories such as this previously, you take it upon yourself to implement a CMS system letting the product owner make such changes in future.  All in the best of intention aimed at helping save time ultimately.  The only problem being that this initial story which was a trivial 1 pointer has now evolved into a completely new story, taking much more time and effort, and now meaning that the current sprint is under threat as the remainder of your tasks are unlikely to be completed in time.</p>
<p>Tips:</p>
<ul>
<li>Solve the current problem</li>
<li>Don't try to predict and solve every eventuality</li>
</ul>
<p></p>
<h4>Pulling the thread</h4>
<p><em>"I don't like the way this is written, I'll just refactor it a little…"</em></p>
<p>Similarly to the above, it may be the case that you are working in a certain area of the codebase and you notice a piece of code that is far from optimal, and you can instantly see how to improve the code and perhaps improve the performance or security of this part of the application.  It could even be the policy of the team that if you are working on a piece of code with insufficient code coverage or quality then it is your duty to raise that, even if it doesn't directly correlate to your story.  However the underlying danger here is that you start refactoring a piece of code and three days days later you are still trying to untangle code that is now so far removed from your initial story as to be unrecognisable.</p>
<p>Tips:</p>
<ul>
<li>Try to consider the current story complexity when considering refactoring.  If the refactor effort will add a large overhead, then this is not the time for that </li>
<li>Write a story detailing the refactoring required and try to ensure that it gets prioritised as appropriate</li>
</ul>
<p></p>
<h4>Scope Creep</h4>
<p><em>"Well that is really good, but wouldn't it be great if it did this…".</em></p>
<p>One of the main advantages of Agile is being able to react to change, and to be open to this kind of request.  However the sprint is a contract between the team and the product owner, and any change to this contract needs to go through a formal change process.  This can seem overkill when the request is relatively trivial, but it is so often the case that when you do something once, it's difficult to justify not doing it again.   This is particularly an issue if the Acceptance Criteria are set, and this new change would go against these. Having a formal change review process would have the acceptance criteria altered as part of the process, meaning there is no cause for confusion between the developer and the quality assurance team.  Allowing scope creep also may add complexity to the task, meaning there is a threat that the sprint will fail to be delivered due to this additional overhead.</p>
<p>Tips:</p>
<ul>
<li>Ensure that once the sprint has started that there is a formal process to go through should anything need changed</li>
<li>Accept that these changes can happen, but ensure the project owner is aware that something already prioritised in this sprint may have to give to accommodate this additional change</li>
</ul>
<p></p>
<h3>Retrospective Smells</h3>
<p>The retrospective is arguably the most important ceremony within the Agile process.  It allows the team to dissect the previous sprint and analyse how they felt it went.  Those aspects of the sprint that went well should be highlighted, allowing the team to self congratulate on a job well done, and actions should be made to attempt to continue doing the things that led to those successes.  However, at least as important is the highlighting of those aspects of the sprint that did not go so well.  Again, actions should be raised to attempt to eradicate any obvious problems that are contributing to these failures.</p>
<p>How to run a successful retrospective is beyond the scope of this document, however some good guides can be found <a href="http://agileretrospectivewiki.org/index.php?title=Retrospective_Plans" title="Retrospective Plans" target="_blank">here</a> and <a href="http://blog.technicalmanagementinstitute.com/2009/08/agile-retrospectives-part-2.html" title="Agile Retrospectives" target="_blank">here</a>.</p>
<p>Utilised properly, the retrospective is a potent weapon in getting your team gelling and working well together.  However falling prey to any of the smells listed below can result in the retrospective being little more than a waste of everybody's time</p>
<h4>Practising Insanity</h4>
<p><em>"We'll not bother with the retrospective this week"</em></p>
<p>We have all heard the phrase, widely attributed to Albert Einstein, that the definition of insanity is doing the same thing over and over and expecting different results.</p>
<p>Very rarely do you achieve the perfect sprint.  There is always something waiting to trip you up.  Unless you take the time to analyse how the problem came about, you will frequently find the same problem coming back to bite you again and again.</p>
<p>Quite often the retrospective is the first thing to get sacrificed when deadlines start looming.  Unfortunately this removes the team's ability to attempt to get to the root of any problems that may occur during the sprint.  Without taking the time to acknowledge the problems, they will get ignored and there will always be the threat of these problems reoccurring in later sprints.</p>
<p>Tip:</p>
<ul>
<li>Stick to your guns.  It's going to be a difficult sell, but it is better to miss delivery of this sprint and ensure that the lessons learned get addressed, rather than sacrificing the retrospective for an extra few man hours of development only to get tripped up by exactly the same problems again</li>
</ul>
<p></p>
<h4>Lights..Camera..CUT</h4>
<p><em>"Ok, good retrospective folks, shall we go to the pub?"</em></p>
<p>The second common problem with retrospectives is that they happen, they are productive, a lot of good content and self reflection happens within the context of the meeting, and then nothing happens.  If you are going to the trouble of having a retrospective, then ensure that the outcomes of the retrospective get carried forward into not only the next sprint, but all future sprints.  There are a number of techniques you can employ to ensure that you are making the most of retrospectives.</p>
<p>Tips:</p>
<ul>
<li>At the start of the retrospective, analyse the action points you came up with in the previous retrospective.  Ensure that you have indeed been following up on these action points, to the point that they are becoming second nature.  If you feel that you are still not naturally performing a particular action point ensure it gets carried across into this sprint's action points</li>
<li>Assign one or more action points to each member of the team, and make it their responsibility to ensure these action points are actioned over the course of the sprint</li>
</ul>
<p></p>
<h3>Conclusion</h3>
<p>Agile itself is not a silver bullet that will instantly solve all your development woes overnight.  It's not necessarily even the best approach for your particular team.  It is, however, a great methodology for fast reactive web design when utilised correctly.</p>
<p>As we have just seen, just blindly following the ceremonies and calling it Agile is not in itself going to guarantee any improvement in output, and could even have the opposite effect.  With any luck you will not recognise too many of the items mentioned above in your own processes and you already have a high functioning team.  Otherwise, hopefully this article will help you spot some problems in your process and assist you getting the most out of your team.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F&amp;title=Agile+Smells" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F&amp;title=Agile+Smells" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F&amp;title=Agile+Smells" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F&amp;headline=Agile+Smells" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Agile+Smells&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Agile+Smells&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Agile+Smells&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Agile+Smells&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Agile+Smells&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F&amp;title=Agile+Smells&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F04%2F02%2Fagile-smells%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/04/02/agile-smells/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DPC Radio: Clean PHP</title>
		<link>http://techportal.ibuildings.com/2012/03/22/dpc-radio-clean-php/</link>
		<comments>http://techportal.ibuildings.com/2012/03/22/dpc-radio-clean-php/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 09:00:35 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[clean php]]></category>
		<category><![CDATA[Sebastian Bergmann]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3367</guid>
		<description><![CDATA[Sebastian Bergmann Even bad code can function. But if code isn't clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn't have to be that way. In this session you will learn how you can offset your technical [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Sebastian Bergmann</strong></p>
<p>Even bad code can function. But if code isn't clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn't have to be that way. In this session you will learn how you can offset your technical debt with clean code that is readable and testable as well as reusable.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F&amp;title=DPC+Radio%3A+Clean+PHP" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F&amp;title=DPC+Radio%3A+Clean+PHP" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F&amp;title=DPC+Radio%3A+Clean+PHP" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F&amp;headline=DPC+Radio%3A+Clean+PHP" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Clean+PHP&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Clean+PHP&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Clean+PHP&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Clean+PHP&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Clean+PHP&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F&amp;title=DPC+Radio%3A+Clean+PHP&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F22%2Fdpc-radio-clean-php%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/03/22/dpc-radio-clean-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_003.mp3" length="93331094" type="audio/mpeg" />
		</item>
		<item>
		<title>MySQL Alternatives to MySQL</title>
		<link>http://techportal.ibuildings.com/2012/03/15/mysql-alternatives-to-mysql/</link>
		<comments>http://techportal.ibuildings.com/2012/03/15/mysql-alternatives-to-mysql/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 08:32:40 +0000</pubDate>
		<dc:creator>Nick Peirson</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[drizzle]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[percona server]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3604</guid>
		<description><![CDATA[Have you been using MySQL for your web applications since your first foray into website development? Perhaps you now run, or are thinking about running, your own server and you will set up MySQL because that is what you have always used. Did you know there are alternatives? A NoSQL database is one of them, [...]]]></description>
			<content:encoded><![CDATA[<p>Have you been using MySQL for your web applications since your first foray into website development?  Perhaps you now run, or are thinking about running, your own server and you will set up MySQL because that is what you have always used. </p>
<p>Did you know there are alternatives? A NoSQL database is one of them, and it has its use cases, but that will need some consideration, and almost certainly some rewriting of your application, to take advantage of. Instead, let me talk to you about some databases that speak your applications language, <a href="http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol" target="_blank">namely MySQL's client server protocol</a>.<span id="more-3604"></span></p>
<h3>A Quick Recap</h3>
<p>MySQL AB was founded by Michael Widenius (Monty), David Axmark and Allan Larsson in 1995. After the 3.x and 4.x release series, MySQL 5.0 arrived on our servers in 2005, bringing in big changes with new features and improved performance over the 4.x releases. In 2008 Sun Microsystems acquired MySQL AB. After <a href="http://monty-says.blogspot.com/2008/11/oops-we-did-it-again-mysql-51-released.html" target="_blank">being critical of the release process</a> for 5.1, Monty left Sun in 2009 to <a href="http://monty-says.blogspot.com/2009/02/time-to-move-on.html" target="_blank">form Monty Program AB</a>. Also in 2009, <strong>Oracle made a bid to acquire Sun</strong>, which reached final approval in 2010. Since then, Oracle have released MySQL 5.5 bringing scalability and monitoring improvements.</p>
<p>These changes of ownership and personnel changes, amid concerns over the direction of MySQL development, have sparked off a thriving community of databases based on the open source MySQL code, developed by people who have strong ideas of the direction they' would like to see MySQL take.</p>
<h3>The Alternatives</h3>
<h4>Percona Server with XtraDB</h4>
<p>Percona was founded by Peter Zaitsev, one of the worlds foremost experts in high performance MySQL, having run the "High Performance MySQL" group within MySQL AB's support group from 2002 to 2006. Percona Server is a patched build of MySQL with <strong>Percona's XtraDB storage engine</strong>, which itself is based on MySQL's InnoDB storage engine. The patches applied have been developed to solve real world problems encountered by the Percona team. These patches are readily available and quite often are integrated back into MySQL releases. The XtraDB storage engine aims to improve the performance and scalability above that of the InnoDB storage engine by taking advantage of hardware features that weren't available or were relatively uncommon when InnoDB was first designed, such as multiple processor cores.</p>
<h4>MariaDB</h4>
<p>Monty formed Monty Program AB to, amongst other things, continue developing MySQL in the direction <em>he</em> thought it should go. To achieve this, he <strong>forked MySQL </strong>and named the fork MariaDB. Key aims of the MariaDB project are to create a more open development model to encourage community participation and to provide a complete drop-in replacement for MySQL. Features from the MySQL code base are regularly merged to bring in fixes and to help maintain compatibility, although there has been some criticism of how quickly this happens. On top of this MariaDB looks to improve performance and add new and better features.</p>
<h4>Drizzle</h4>
<p>In 2008 Brian Aker, who was previously MySQL's Director of Architecture, forked MySQL to create the Drizzle project. The Drizzle project follows a similar process to the development process of the Linux Kernel, promoting control by the community over control by a company, both at the code level and at the developer level. It's designed as a pluggable micro-kernel promoting easy extension. While Drizzle was initially forked from the MySQL 6.0 code base, effort has been made to favour performance over compatibility with MySQL, particularly with reference to scalable performance for multiple cores and cloud deployments.</p>
<h3>Which one should I use?</h3>
<p>After reading this article, resist the temptation to go running off and install one of the alternatives on your production hardware! If after reading this article you do decide to investigate migrating, I would highly recommend <strong>benchmarking the performance, stability and compatibility of the alternatives </strong>against your application. In fact, it is less of a recommendation and more of a requirement. If you take anything away from this article, it should be that each of the teams have concentrated on different areas of MySQL. Which one works best for you depends on your application workload. What works best for sustained throughput of short running simple queries isn't necessarily going to work best for lots of long running complex queries. Whether they continue to diverge to fulfil different needs or whether one of the projects manages to successfully integrate the best features of all projects to create an über-database remains to be seen. If that happens, then you get to have it all, but for now to find the best database for you, you will need to benchmark, benchmark, benchmark!</p>
<h3>Compatibility</h3>
<h4>Percona Server and MariaDB</h4>
<p>Both Percona and MariaDB are binary compatible. You can grab a tarball of either, extract it stop MySQL, start Percona/MariaDB, load up your client and start running queries like you'd just restarted MySQL. This is a great starting point to test your application and see what improvements you get out of the box, it is also very good for benchmarking as it means you don't have to migrate your data to make comparisons.</p>
<h4>Drizzle Compatibility</h4>
<p>The Drizzle acorn has fallen furthest from the oak that is MySQL. While they share common ancestry, Drizzle is no longer binary compatible with MySQL and therefore more care needs to be taken over migration. Here's what most people will need to know:</p>
<ul>
<li>Drizzle supports InnoDB, but the <strong>InnoDB file formats are different</strong>. This means you have to transform your data, you can't just start Drizzle and point it at your MySQL files.</li>
<li>MyISAM is supported only for explicitly created temporary tables, and is expected to be completely unavailable in a future release.</li>
<li>MERGE, FEDERATED, ARCHIVE and CSV storage engines have all been removed.</li>
<li>Triggers and views aren't supported natively, however appropriate hooks are provided to allow these to be added as plugins</li>
<li>MySQL's <strong>stored procedures</strong> implementation has been deemed to be less than optimal and <strong>has been removed</strong>.  There's no indication that this will be reimplemented, they are favouring improved batching of commands over the wire to reduce the time row locks are held, which is the main advantage of stored procedures in MySQL.This decision also fits with the Drizzle aim to reduce database complexity.</li>
<li>Some <a href="http://docs.drizzle.org/mysql_differences.html#removed-functions" target="_blank">functions</a>, <a href="http://docs.drizzle.org/mysql_differences.html#removed-commands" target="_blank">commands</a> and <a href="http://docs.drizzle.org/mysql_differences.html#keywords-removed" target="_blank">keywords</a> have been removed</li>
<li>Some objects have been removed. A rule of thumb as to what has been removed is where there were previosuly <code>TINY-</code>, <code>SMALL-</code> and <code>MEDIUM-</code> types, there is now one optimised type. Aliases have also been removed, e.g. <code>SET </code>has been removed leaving <code>ENUM</code>. A <a href="http://docs.drizzle.org/mysql_differences.html#objects-removed" target="_blank">comprehensive list of removed objects</a> is available. </li>
</ul>
<p></p>
<p>Most of these changes are likely to affect your database administration more than your application implementation, sticking to the idea that you should still be able to drop Drizzle in with little or no change to your application.</p>
<p>To simplify the migration of data from MySQL to Drizzle, Drizzle provide the <a href="http://docs.drizzle.org/clients/drizzledump.html" target="_blank">drizzledump tool</a>. While designed for Drizzle backup, it can connect to a MySQL server and produce a Drizzle-compatible export. It manages the above compatibility issues for you, e.g. conversion of data types in table definitions. If you've got both servers live, drizzledump can even import from MySQL straight into Drizzle without an intermediary file.</p>
<h3>Features</h3>
<p>Not only do the alternatives offer improved performance for some use cases, but they also offer additional features that are not present in MySQL. Deciding to take advantage of these features means you move further away from MySQL compatibility and portability, but if there is a killer feature you want to use in your application then adopt the alternative but be aware of this trade-off. While you're still deciding on the best database server for you, you need to track and isolate these changes to allow you to switch between the alternatives. I'd suggest creating a branch, or equivalent, in your version control system for application change. It's worth version controlling your database config as well, if you're not already (you can read more about this in Harrie's post about <a href="http://techportal.ibuildings.com/2011/01/11/database-version-control/">database version control</a>). Even better you could use a DevOps tool like <a href="http://www.opscode.com/chef/" target="_blank">chef</a> or <a href="http://puppetlabs.com/" target="_blank">puppet</a> to create reproducible database deployments, but that's a subject for another article.</p>
<h4>Percona Server with XtraDB</h4>
<p><b>XtraDB</b></p>
<p>Percona Server comes with XtraDB, a drop-in replacement for the InnoDB storage engine. It offers compatibility with InnoDB, so everything you can do with InnoDB works with XtraDB. The differences are improved performance, which we'll cover shortly, diagnostics and reliability. If you've ever had problems due to corrupt InnoDB tables you'll be pleased to know that XtraDB gives you a corrupt table error rather than a crash.</p>
<p><b>HandlerSocket</b></p>
<p><a href="http://yoshinorimatsunobu.blogspot.com/2010/10/using-mysql-as-nosql-story-for.html">HandlerSocket</a> is a MySQL daemon plugin that gives you a NoSQL interface to MySQL storage engines. It is fast! Benchmarks have shown it supporting nearly twice the number of queries per second as memcached. That's right, not twice as fast as MySQL client access (it is nearly 7 times as fast actually) but nearly twice as fast as memcached.</p>
<p>Percona Server comes with the HandlerSocket plugin built and ready to run with just a couple of lines of config. The HandlerSocket plugin can be built for MySQL as well, but Percona Server ships with it ready to go and includes documentation on its configuration so, for that effort, it goes down as a feature for Percona Server.</p>
<p><b>Diagnostics and Monitoring</b></p>
<p>Percona's business is analysing MySQL installations with performance problems and providing solutions. This wouldn't be possible without being able to first identify the problem. While MySQL provides some indicators for status and performance, Percona found that they fell short so, during the course of their work, they've written many improvements and additions to the reporting of Percona Server status and performance. Percona Server now offers over 20 more tables in <code>INFORMATION_SCHEMA</code> and 60 more status and performance counters, along with breakdowns of performance per table, per index, per client and per thread, and this is still not a complete list of diagnostic capabilities added in Percona Server! A MySQL feature that you may be familiar with, the slow query log, has also had some additions, bringing microsecond precision to query run times, additional query statistics and the ability to enable and disable it at runtime. With this information more readily available, application and database optimisation becomes simpler, bottlenecks become easier to identify and problems are solved faster, all of which are as important to application development as squeezing better performance out of MySQL out of the box.</p>
<h4>MariaDB</h4>
<p><b>Additional storage engines</b></p>
<p>MariaDB offers additional storage engines which can provide optimisations for specific data models.</p>
<ul>
<li><strong>Aria:</strong> Intended to be a fully transactional storage engine comparable with InnoDB and planned to be the default storage engine for MariaDB
</li>
<li><strong>XtraDB:</strong> This is the same engine as discussed above and developed by Percona</li>
<li><strong>PBXT:</strong> A transactional storage engine originally developed by Primebase, now merged into the MariaDB development tree and maintained there</li>
<li><strong>FederatedX:</strong> A drop in replacement for the Federated storage engine</li>
<li><strong>OQGRAPH:</strong> A query engine designed to handle heirarchies and complex graphs. More information can be found at <a href="http://openquery.com/graph/doc" target="_blank">http://openquery.com/graph/doc</a>.</li>
<li><strong>SphinxSE:</strong> While implemented as a storage engine, this plugin actually provides a connection to a sphinx search server.</li>
<li><strong>IBMDB2I:</strong>The MySQL IBMDB2I storage engine that was removed in MySQL 5.1.55</li>
</ul>
<p></p>
<p><b>HandlerSocket and HANDLER statement</b></p>
<p>MariaDB also comes bundled with HandlerSocket as I mentioned above for Percona Server. It also takes direct storage access one step further by adding a HANDLER statement allowing for direct reads from storage engines via key lookup, allowing low level access that bypasses the query optimiser. This can offer up to 50% performance increase, but beware that it doesn't offer consistency. There are also a few cases where <a href="http://kb.askmonty.org/en/handler-commands#limitations">it might end badly</a>; as always with great power comes great responsibility.</p>
<p><b>Virtual columns and dynamic columns</b></p>
<p>If you have used Oracle or MSSQL you may already be familiar with virtual columns. For those who haven't seen them before, they allow a derived column in your table. They operate in two modes, <code>VIRTUAL</code> and <code>PERSISTENT</code>. The behave the same but are implemented slightly differently. <code>PERSISTENT</code> virtual columns are calculated and written on row writes, whereas <code>VIRTUAL</code> virtual columns are calculated when the row is read. Which you use depends on whether you need to improve performance on read or write.</p>
<p>Dynamic columns allow you to store different columns for each row in a table. One use case for this is a products table holding multiple types of products, each with different attributes. Often this is handled by creating an <a href="http://techportal.ibuildings.com/2010/10/21/the-eav-data-model/">EAV structure</a> maintained by an application, however dynamic rows can provide a simpler solution (I know it looks like NoSQL, but it's not, promise ;) ). It is implemented by storing the dynamic columns in a blob and providing native functions for accessing this data. While the current implementation is stable and usable, there are some limitations and improvements are planned to address these limitations. The aim is to allow dynamic columns to be almost indistinguishable from normal columns.</p>
<h4>Drizzle</h4>
<p>Drizzle's focus on performance and simplification led to the Drizzle team designing a microkernel architecture, supporting plugins to provide features rather than implementing them in the core. This simplifies the process of adding features which will hopefully cultivate an ecosystem of Drizzle plugins and Drizzle plugin developers. It's clear that developing a thriving development community around Drizzle is the intention, as it's been made as simple as possible to develop and build plugins. As noted by Padraig O'Sullivan, <a href="http://posulliv.github.com/2010/03/10/out-of-tree-plugin.html">this is 'freaking awesome'</a>.</p>
<p>To date there are 75 official Drizzle plugins covering everything from authentication (Schema, LDAP, HTML, File, Allow all) to server protocols (MySQL, Drizzle) to storage engines (InnoDB, MyISAM, Memory). There is some criticism to this approach, as people are used to monolithic applications and expect to features to be available without needing to decide which plugins are enabled, with authentication being the usually-cited example. Personally I like the plugin approach, but it's not for everyone. As almost everything is a plugin, most plugins provide functionality that's present in the core of MySQL, so I won't go into those. Here are the best of the rest:</p>
<p><em>Authentication plugins</em></p>
<p>Authentication is no longer bound to a table in the MySQL schema. One of the most interesting authentication plugins is the LDAP plugin, allowing you to use your central LDAP server for authentication rather than maintaining a separate list of credentials within your database server, however this can be complex if you don't already use LDAP in your organisation. For development you might want to use the PAM plugin so you can log in with your usual linux credentials. If you're happy with the MySQL way of doing things, the Schema authentication plugin allows authenticating against credentials stored in the database. Whichever authentication scheme you choose, you'll probably want to disable the "Allow All" plugin which allows unrestricted access.</p>
<p><em>Console Plugin</em></p>
<p>With the console plugin enabled you can connect directly to the database, no client required. As this is like most other *nix programs, simply connecting STDIN and STDOUT, this allows for piping input and output directly to and from Drizzle without an intermediary client.</p>
<p><em>JS Plugin</em></p>
<p>This plugin adds the JS user function that will run a javascript snippet within a SQL statement. It's got a built in JSON parser so you can store and operate on JSON strings in the database. Both the JSON parser and JS interpreter are implemented by Google's v8 javascript engine. At the moment it's not a first class language within Drizzle, but there are plans to allow it to be used as a language for writing stored procedures.</p>
<p><em>Memcached</em></p>
<p>For most applications, caching is a Good Idea (TM). Memcached is commonly used in the same stack as MySQL, and Drizzle has a few tricks up its sleeve to make this easier. The normal access pattern is:</p>
<ul>
<li>query the cache</li>
<li>if a key isn't present in the cache, query the database</li>
<li>once we've got the information out of the database, push it back into the cache</li>
</ul>
<p></p>
<p>With the Drizzle <code>memcached_functions</code> plugin, we can send the data off to memcached in the same SQL statement we use to retreive the data. This gives us a couple of interesting possibilities. How about a trigger to prime the cache when data is inserted into Drizzle, or to invalidate cache when rows are deleted? The only slight issue with this is that there isn't a plugin that implements triggers yet, but I'm sure one will be along shortly.</p>
<p><em>Message Queues</em></p>
<p>Drizzle provides plugins to publish transactions to both <a href="http://www.rabbitmq.com/" target="_blank">RabbitMQ</a> and <a href="http://www.zeromq.org/" target="_blank">ZeroMQ</a>. If you're currently polling your database for new data, this would allow you to move the load from your database to a message queue, providing better scalability. It could also be used as a basis for replication from Drizzle to other data stores.</p>
<p><em>Query Logging</em></p>
<p>If the query logging plugin is loaded, by default it logs nothing. This can be controlled at runtime allowing for logging of specific queries or globally at specific times or events. This means that it only logs on demand, and importantly does not require a server restart to turn it on or off. It's also possible to log queries out to a Gearman server for processing. There is at least <a href="http://fmpwizard.blogspot.com/2009/08/drizzle-and-gearman-logging-plug-in.html" target="_blank">one person out there using Gearman</a> to integrate Drizzle with MySQL Enterprise Monitor.</p>
<p><em>Replication</em></p>
<p>Replication has had a complete overhaul from its MySQL origins. Replication is implemented by storing replication events as <a href="http://code.google.com/apis/protocolbuffers/docs/overview.html" target="_blank">Google Protocol Buffer </a>messages in an InnoDB table. Storing replication events in a standardised format in a readily accessible table means that writing replication plugins and clients becomes much easier, simplifying the replication of data between different formats and technologies.</p>
<h3>Performance</h3>
<p>As I already mentioned, each variant has its strengths and weaknesses. Currently, none of the contenders, including MySQL, offer a complete best, or worst, performance profile for all use cases. If I benchmarked all four databases on identical hardware for various workloads with various levels of concurrency I could easily be here for weeks. So to make everything I've written about features and compatibility relevant by the time you read this, I'm going to give you the distilled highlights and aims for each project. I also can't stress enough that <strong>performance is extremely dependant on workload</strong>, meaning that the only way to be sure which database server will work best for you is to benchmark it against your application. So let us take a look at the contenders:</p>
<h4>Percona</h4>
<p>The bulk of Percona Server's performance improvements come from its XtraDB storage engine. Percona identified a situation in MySQL and InnoDB where throughput would steadily increase and then plummet, stalling briefly, before building back up, continually repeating this cycle of build up and stall. XtraDB has made big strides in addressing this problem and will now sustain high throughput, often at higher peak performance, without suffering the same stalling. If your workload requires a high sustained throughput, Percona Server is likely to be a good choice. If your database activity is short bursts of transactions, you're less likely to see such a pronounced improvement.</p>
<p>Another significant improvement is its ability to scale vertically (more CPUs and memory within one server). Percona Server will scale consistently to 48 cores allowing all but the biggest applications to completely avoid the necessity to scale horizontally (more servers using replication and/or sharding), reducing application and administration complexity.</p>
<h4>MariaDB</h4>
<p>While MariaDB has backported some MySQL 6.0 features and improvements, the current release is based on MySQL 5.1, so there are some advancements that MySQL and Percona Server have that are not yet integrated into MariaDB. At the time of writing there is an alpha release of MariaDB 5.5 available which is based on MySQL 5.5 that will address this. There is criticism about the time it takes for MariaDB to rebase on a new version of MySQL, although I wonder if the project would make its own improvements as quickly if more time was spent in merging in changes.</p>
<p>MariaDB has not been idling in the performance department however, the <strong>biggest improvements are in the query optimiser</strong>. The role of the query optimiser is to try to run the query in the most efficient manner by calculating the most efficient joins and making the best use of indexes to reduce the amount of disk reads and computations needed to return the result set. Have you ever had to rewrite a subquery into a less readable, more complex join, to make it perform better? MariaDB's query optimiser will do a good job of this under the bonnet. This helps in some cases with writing more readable SQL and also protects your application from a certain class of performance-killing queries that could sneak in from an unwary developer. As well as subquery optimisation, join optimisation has also been improved. Added together, an application that uses lots of complex queries should see good improvements from this. If, however, your application is performing lots of simple queries, it is unlikely you will see the benefit of the improved optimiser.</p>
<p>Instead of using InnoDB, MariaDB makes use of Percona's XtraDB storage engine, so receives similar performance benefits to Percona Server in this area.</p>
<h4>Drizzle</h4>
<p>Drizzle takes a different approach to performance. Rather than concentrating on raw performance, e.g. how fast Drizzle can process a transaction or number of transactions, they're focused on scaling. Drizzle is targeting workloads where applications need to be able to run 1024+ concurrent connections. MySQL's sweet spot was traditionally around 16 threads, although recent versions appear to cope better with higher concurrency and, as usual, this all depends on workload. From an architecture perspective this means systematically removing contention points within Drizzle that have historically prevented MySQL from scaling. This support for high concurrency workloads has sometimes resulted in design decisions that have caused worse performance at lower concurrency so if your application does not require high levels of concurrency you may not see any performance improvement compared to MySQL and in some cases may actually see worse performance. If you need high concurrency, however, the drizzle is an excellent choice for you.</p>
<h3>Summary</h3>
<p>The most satisfying conclusion possible to draw from this would be that one of the alternatives offers the best in everything and I could tell you to run out and install it right away. Life is not that simple, however. If you've skipped ahead to peek at the answer, unfortunately this is one of those open ended questions where there is no single right answer.</p>
<p>Each alternative has its advantages and disadvantages, things it does well and areas where others have overtaken it. Which you choose is entirely dependant on on your application workload.</p>
<p>What is abundantly clear though is that MySQL is still going strong after its changes in ownership and this is providing a strong base, and competition, for some interesting projects to develop. It will be interesting to see how they continue to improve and differentiate themselves. It's also impressive to see the community that's developing around them and the level of passion displayed, as evidenced by the comments made around the recent MariaDB benchmarks.</p>
<h3>Your Next Step</h3>
<p>After doing some initial benchmarking and compatibility testing, the best way of seeing how your application works with one of the alternatives is to run your application against it, however you don't want to migrate everything over until you're sure you've settled on the right one. A good way to do this is to set up a slave that you can point a copy of your application at to perform reads against. You can then configure your application to perform an a/b test, monitoring performance between your MySQL slave(s) versus your alternative slave. <strong>May the best alternative win!</strong></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F&amp;title=MySQL+Alternatives+to+MySQL" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F&amp;title=MySQL+Alternatives+to+MySQL" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F&amp;title=MySQL+Alternatives+to+MySQL" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F&amp;headline=MySQL+Alternatives+to+MySQL" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=MySQL+Alternatives+to+MySQL&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=MySQL+Alternatives+to+MySQL&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=MySQL+Alternatives+to+MySQL&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=MySQL+Alternatives+to+MySQL&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=MySQL+Alternatives+to+MySQL&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F&amp;title=MySQL+Alternatives+to+MySQL&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F15%2Fmysql-alternatives-to-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/03/15/mysql-alternatives-to-mysql/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>PHPUK 2012 Friday Conference Report</title>
		<link>http://techportal.ibuildings.com/2012/03/12/phpuk-2012-friday-conference-report/</link>
		<comments>http://techportal.ibuildings.com/2012/03/12/phpuk-2012-friday-conference-report/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 14:21:37 +0000</pubDate>
		<dc:creator>John Cleary</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[phpuk2012]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3595</guid>
		<description><![CDATA[The venue for this years PHP UK Conference, The Business Design Centre in Islington, North London was a pretty good choice in my opinion. With over 600 delegates attending over the 2 days, the large lobby outside the three conference rooms provided a good space to mingle, check out the numerous display stands (whilst grabbing [...]]]></description>
			<content:encoded><![CDATA[<p>The venue for this years PHP UK Conference, The Business Design Centre in Islington, North London was a pretty good choice in my opinion. With over 600 delegates attending over the 2 days, the large lobby outside the three conference rooms provided a good space to mingle, check out the numerous display stands (whilst grabbing a few free goodies) and scan the selection of discounted books on offer from O'Reilly.  </p>
<p>There were 34 sessions in all, however a number were repeated across both days. I guess it's hardly surprising as many visitors will attend just one of the two days, and it does give the super-keen amongst us the opportunity to grab more of the talks.<span id="more-3595"></span></p>
<p>Rasmus Lerdorf gave an entertaining if somewhat unconventional <a href="http://joind.in/talk/view/4944">keynote on the Friday </a>-  a potted history of the PHP language given by the man himself was, for me at least, very memorable. The second half of the talk concentrated on the new features available in PHP 5.4 and whilst not the usual rousing call-to-arms we expect from a keynote, it was useful to know. </p>
<p>Following on from that was a talk entitled <a href="http://joind.in/talk/view/4955">Big Data by James Littlejohn</a>. For me, and a few people I spoke to afterwards, this was a disappointing talk. Littlejohn quite possibly had a very good idea but the talk did not do it much justice. I would have preferred if he had begun by explaining the problem he was trying to solve and then show the software he had built. The remainder of the time could then have been spent looking at the guts of the system.</p>
<p>After that I strolled down to the Unconference and ran into my colleague Marcello Duarte giving a talk about <a href="http://joind.in/talk/view/6130">Deliberate Practice</a> which was a nice 20 minute aside and considering how short these talks are, it packed in a good deal of information (or should I say conveyed strong values?). The idea is to practice a task not with the intention of getting it done, but with the intention of getting better at that task. The analogy was drawn from the field of sports and in particular martial arts when students perform drills to increase their proficiency.</p>
<p><a href="http://joind.in/talk/view/4958">Distribute the Workload</a> in the afternoon gave a flying tour on how to build applications that can scale more easily: by using a larger number of smaller servers, making it easier and cheaper to scale the parts of your platform that are under the greatest strain. Of course, more servers means more management overhead and Helgi expertly ran thought the various monitoring, scaling and multi-cloud technologies. I was particularly interested in New Relic for monitoring as it offers a good level of information that you can drill down into for more details. Gearman also got a well-deserved mention for allowing your application to distribute the workload across multiple servers. Interestingly, Gearman tasks can also spawn sub tasks if they see fit, making it a very flexible architecture. If you are about to build a high-availability multi-region application then this was the talk for you.</p>
<p>One of the few non-technical talks was given by June Henriksen. <a href="http://joind.in/talk/view/4952">Creative Coding</a> looked at how the brain works and coming from the standpoint that software development is a creative task, looked at how to stimulate the creative parts of the brain to achieve better solutions. For my money the talk would have benefited from a little less emphasis on how your brain works and more practical examples of how to get these benefits in your work environment. It was however, an enjoyable talk, and with a bit of polish this could make a pretty good keynote.</p>
<p>Ian Barber delivered a very interesting session on <a href="http://joind.in/talk/view/4949">Teaching Your Machine to Find Fraudsters</a> which explained how you could use SVM (Support Vector Machine), which is now part PHP 5.4, to predict if something is true or not. Ian, who is the maintainer for SVM, put it to good use in this talk and explained how to feed the machine a bunch of historic data about credit card transactions where you know which transactions are fraudulent and then ask the machine to predict if new activity is fraudulent or not.</p>
<p>Friday was rounded off nicely with a <a href="http://joind.in/talk/view/4960">panel discussion</a> chaired by Ian Barber with Rasmus Lerdorf, Nikolay Bachiyski and Hugh Williams. The panel answered questions that had been collected via Twitter during the day and further questions fed through as the discussion went on. The general message was that for most of us mere mortals, PHP is more than adequate at scaling. Even Hugh Williams admitted that at one point eBay were considering rewriting their whole front-end in PHP. However, when things get really big (Facebook, Yahoo size) then the problems are not the language but rather the architecture. Even though the discussion was PHP at Scale, much of what was said was relevant to any language. It was a very enjoyable end to a good day of talks.</p>
<p>Last but by no means least was the after-conference social which lasted about an hour or so. All attendees were automatically entered into a prize draw for technical books. At a guess I think they must have handed out 40 or 50 books and it appears to go on for quite a while. I even managed to bag a book myself!  </p>
<p>If this years conference had a theme, it was "scaling" with quite a few talks dedicated to this subject. If I had to find a criticism I would probably say that the talks were probably not quite technical enough, but I appreciate you can't please everybody and perhaps the purpose is to whet your appetite rather than provide an in-depth how-to or workshop. Overall a great conference and I'm sure I'll go again next year!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F&amp;title=PHPUK+2012+Friday+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F&amp;title=PHPUK+2012+Friday+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F&amp;title=PHPUK+2012+Friday+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F&amp;headline=PHPUK+2012+Friday+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=PHPUK+2012+Friday+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PHPUK+2012+Friday+Conference+Report&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=PHPUK+2012+Friday+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PHPUK+2012+Friday+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PHPUK+2012+Friday+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F&amp;title=PHPUK+2012+Friday+Conference+Report&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F12%2Fphpuk-2012-friday-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/03/12/phpuk-2012-friday-conference-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPUK 2012 Conference Report</title>
		<link>http://techportal.ibuildings.com/2012/03/05/phpuk-2012-conference-report/</link>
		<comments>http://techportal.ibuildings.com/2012/03/05/phpuk-2012-conference-report/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 11:33:52 +0000</pubDate>
		<dc:creator>Adam Smith</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpuk2012]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3573</guid>
		<description><![CDATA[This year's PHP UK was my first, so I was not entirely sure what I should expect. Upon arriving at the business design centre, my first impression was that it is an excellent venue for a conference. So much so that two were running in parallel, Stampex - the British national stamp exhibition - being [...]]]></description>
			<content:encoded><![CDATA[<p>This year's PHP UK was my first, so I was not entirely sure what I should expect. Upon arriving at the business design centre, my first impression was that it is an excellent venue for a conference. So much so that two were running in parallel, Stampex - the British national stamp exhibition - being PHP UK's companion on both days.<span id="more-3573"></span> The venue was plenty big enough and there was no issue with the two quite different crowds sharing the building, even if I was slightly taken aback to see what appeared to be a town mayor getting in my way when I was trying to find a toilet.</p>
<p>I arrived just in time for the opening keynote, having been quickly ushered in. Nobody even bothered to check that I had a ticket, though I later discovered this wasn't special treatment for me, nobody's eligibility to enter had been checked. I am pleased to report that by Saturday morning they had realised (or been told) that they should be checking attendees were supposed to be entering – a real world example of emergent design perhaps?</p>
<h3>Talks - Friday Morning</h3>
<p><a href="http://joind.in/talk/view/4944">PHP in 2012 - Rasmus Lerdorf </a></p>
<p>Rasmus's keynote contained a good insight into the development and motivation behind PHP as a language, and a whistle stop tour of the new features coming to the world in PHP 5.4. It was excellently presented and well received by what was an incredibly packed out room – when I got there I was forced to stand at the back it was so well attended. A rallying call for testing, documenting and further developing the language made me think I should probably try to give something back to the technology that is currently keeping me in a job. The pesky HashDOS problem was explained clearly and I am now wary of json_decode() - I must always remember that users can't be trusted. I was pretty pleased with this conference opener, despite some comments that it was too technical for a keynote, for me it hit just the right note.</p>
<p>Time for a quick cup of coffee and some musings with colleagues before hitting the first of my choices for the main tracks of the conference.</p>
<p><a href="http://joind.in/talk/view/4955">Big Data Web - Big Data Science - Big Data Mining - James Littlejohn</a></p>
<p>I came into this talk based solely on it's excellent title, I was not alone and the "Big Data" intrigue had gathered a reasonably large crowd. Unfortunately, the content of the presentation seemed to have little correlation to the title, this being simply a walkthrough of what appeared to be a half-written application. My attention waned very early on and never really returned. By the end I still wasn't entirely sure what the point was.</p>
<p><a href="http://joind.in/talk/view/4956">Data Abstraction in Large Web Applications - Brandon Savage</a></p>
<p>Next up a talk about data abstraction. This was very well presented, conveying a simple idea very clearly. I felt the deliberate avoidance of any particular implementation detail was a good move, leaving just the problem and solution without the specific technical details getting in the way of an important concept. Throwing in the real world example of where it went wrong in his own project was brave, but helped illustrate the point effectively. Maybe the content was a bit basic for the seasoned OO developer, but definitely worthwhile for anyone new to the topic.</p>
<h3>Lunch</h3>
<p>With not one, not two, but three serving stations, lunch was served pretty efficiently. A choice of lamb pasta or vegetarian lasagne, followed by cake, orange juice and more coffee. Leaving me more than enough time to escape the increasing heat of the room and get outside to take in some fresh air before the afternoon session.</p>
<h3>Talks - Friday Afternoon</h3>
<p><a href="http://joind.in/talk/view/4947">To a thousand servers and beyond: scaling a massive PHP application - Nikolay Bachiyski</a></p>
<p>First stop after lunch and the start of what appeared to quickly become a theme at the conference – scaling. Specific details of how wordpress.com scaled up it's operation were presented confidently, but the main talking point after this slot seemed to be the revelation that wordpress.com only have one svn branch (trunk), which is deployed many times a day, with all the in-development code still in it. In some respects it's a shame that this became the lasting impression as lots of the content was interesting. I was particularly interested to see the way wordpress.com has gone about solving MySQL distribution with a tool they have since open sourced (HyperDB). It not only manages read replicas for entire databases, but also individual tables, leaving no requirement for the application code to know where to send queries – an idea that I intend to investigate further.</p>
<p><a href="http://joind.in/talk/view/4958">Distribute the workload - Helgi Þormar Þorbjörnsson</a></p>
<p>So, following on from a talk about scaling, I then watched another talk about scaling. This time from a slightly more theoretical viewpoint. I thought it was an excellent discussion covering both availability and performance (or more accurately perception of performance) of web applications. The main thing to take away from the approach was liberal use of messaging queues, monitoring and, as the title suggests, distributing the workload to many different components, making for easy horizontal scaling. The talk ran over the allotted time slightly and still I felt Helgi had more to say. I would have been happy to sit and listen to his thoughts for longer too.</p>
<p><a href="http://joind.in/talk/view/4959">Try { Getting People To Come To A Talk About Exceptions } - Ed van Beinum</a></p>
<p>Another excellently presented topic. A brief tour through the history of the Exception, then some details about the particular PHP quirks. It was definitely worth seeing and the 'Are you prepared to end the program?' question will no doubt enter my mind every time I type the word throw from now on. In fact, I think I'd like my IDE to ask that question of me when I type throw, just in case I forget. That can only lead to better software.</p>
<p><a href="http://joind.in/talk/view/4960">Panel: PHP at Scale - Ian Barber, Rasmus Lerdorf, Nikolay Bachiyski, Hugh Williams</a></p>
<p>I found this portion of the day interesting to listen to, some good questions were asked, and good answers given. Ian Barber did an excellent job of chairing the discussion, but for future events I would suggest giving each of the panel their own microphone to encourage more debate. The format was good and it was an excellent way to end the formal part of the day. The main thing I came out with was that if PHP is your bottleneck when trying to scale, you're probably not doing it right.</p>
<h3>Networking and Raffle (and beer!)</h3>
<p>We all know there is no such thing as a free beer, but this is about as close as one can get. To top it off some lucky attendees also got themselves a free book, alas I was not a winner this time. I think this 'event' was actually better suited to the aftermath of a PHP conference than the party that followed it, and I'd encourage after parties to be more in this style for future events, even if I did nip out early to go and grab something to eat in a nearby Spanish restaurant.</p>
<h3>Mid Conference Party</h3>
<p>Having fed myself I returned to the masses, but ended up only attending this party very briefly. The venue for it was not especially well suited and the loud music made chatting to fellow conference goers difficult. Though anyone who spoke to me on the night will know that this is just a thinly veiled attempt to hide my disgust at being served icy cold stout.</p>
<h3>Talks - Saturday Morning</h3>
<p><a href="http://joind.in/talk/view/4962">Challenges at scale: extreme data and platforms at eBay - Hugh Williams</a></p>
<p>So day two arrived, and keen to learn the lesson of arriving just in time on Friday, I arrived in plenty of time to find a good seat for Saturday morning. If I'd known it wasn't going to be quite as well attended and seats would remain free throughout I could have grabbed those extra few vital minutes of sleep.  Nevertheless, I was pleased I had made the effort to be there for another splendidly presented keynote. I didn't take away anything I think will be especially useful going forward, but it was enjoyable to listen to and interesting to see some of the infrastructure choices at eBay.</p>
<p><a href="http://joind.in/talk/view/4963">Security audits as an integral part of PHP application development - Sijmen Ruwhof</a></p>
<p>After a quick coffee break I attended this presentation based on a recommendation from someone who had seen it the previous day. The justification of why security is an important aspect of development was good and the idea of nominating a member of the team to be responsible for the robustness of an application is interesting. There was also a brief introduction to a wide variety of testing tools. However, I felt more time should have been given to explaining the techniques and results. The live demo was not that easy to follow and it would have been better to spend the time clearly explaining the concepts.</p>
<p><a href="http://joind.in/talk/view/4969">Open Source Search: An Analysis - Justin Finkelstein</a></p>
<p>I came away from my next session slightly disappointed - a description of four open source search platforms with some interesting points, but without a solid comparison. I think I'd have preferred fewer implementation details and more discussion points. The offered conclusion appeared to be that the different platforms are suited to different situations – but after the talk I still have no idea which situations are suited to each. It is possible that I just missed it, since the delivery was very dry and I had begun to think about lunch.</p>
<h3>Lunch</h3>
<p>In much the same efficient way as Friday, lunch was served up. This time my choice was beef casserole, with the cake, orange juice and coffee thrown in for good measure. Since it wasn't quite so hot today a trip outside wasn't required, so I spent a few minutes at the O'Reilly stand looking at their book selection and wandered upstairs to see the Unconference schedule. I was intrigued by some of the things scheduled at the Unconference in the afternoon, but in the end I stuck to the main tracks and didn't actually attend any of them.</p>
<h3>Talks - Saturday Afternoon</h3>
<p><a href="http://joind.in/talk/view/4970">MySQL Update - Dave Stokes</a></p>
<p>I had been looking forward to this presentation, I've been using MySQL now for as long as I've been using PHP and so was hoping to find out what the future holds. Unfortunately, this seemed to be a glorified advert for MySQL Enterprise edition. I've had some experience of the enterprise tools and they can be useful, but this didn't seem to be the right place to discuss them. I had attended the talk with the promise of hearing about the new features of MySQL 5.6, but I don't think I really got that from it.</p>
<p><a href="http://joind.in/talk/view/4971">HTML5 for PHP developers - Andrew Betts</a></p>
<p>After the disappointment of being advertised to in the previous talk, I really enjoyed listening to this presentation. I felt it was well delivered and it easily held my attention throughout. Although briefly touching on some HTML5 features, the crux of the talk was about solving new problems that the next level of the web will have to overcome. The ideas were good and I shall definitely try to remember the solutions if (or more likely when) I meet the same problems. I was pleased to see a nice balance between discussing both a particular implementation and the underlying concepts that went into the solution.</p>
<p><a href="http://joind.in/talk/view/4967">PHP Under The Hood - Johannes Schlüter</a></p>
<p>For only the second time across the two days I remained in my seat to see the next presentation in the same room. I attended not really knowing what to expect, or how useful knowing what was happening to my PHP code when it was executing would be. As it turned out I think there were some useful points, along with some not so useful points, but it was enjoyable nonetheless. If I take anything away from this it will be that references in PHP are slower than copies. But in reality, I don't suppose the slow down for using references would really be that noticeable – still, I'm happy to go with a 'more is better' philosophy on this one.</p>
<p><a href="http://joind.in/talk/view/4978">Panel: SQL vs NoSQL - Johannes Schlüter, Helgi Þormar Þorbjörnsson, Derick Rethans, Dave Stokes, David Zuelke</a></p>
<p>This second panel discussion was highly anticipated, but I don't think much was really covered here. This time round the lack of microphones is probably what made it so entertaining. I felt that once again it was very well chaired, this time by Helgi Þorbjörnsson. I'm not going to complain about the subject matter not being tackled with any great force, since by this time I was flagging a bit anyway and this was a good light-hearted session to finish the conference.</p>
<h3>Conclusion</h3>
<p>To sum up the conference in one somewhat uninformative metaphor I'd say 'it was a mixed bag'. I thought<br />
the panel discussions worked very well and I would like to see more of them in future. Scaling was definitely the hot topic of this year's conference, and I'm sure it will continue to be a hot topic throughout 2012 - though my current project does have me heavily thinking about scaling so maybe I've just got it on the mind. From what I can tell, PHP's future looks bright, but now is the time we should all be helping out (<a href="https://bugs.php.net/random">https://bugs.php.net/random</a>).  Some of the subject matter was very introductory, but I still came away feeling I had learned something new and certainly hadn't completely wasted my time. That means the conference, in my book, was a success.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F&amp;title=PHPUK+2012+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F&amp;title=PHPUK+2012+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F&amp;title=PHPUK+2012+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F&amp;headline=PHPUK+2012+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=PHPUK+2012+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PHPUK+2012+Conference+Report&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=PHPUK+2012+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PHPUK+2012+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PHPUK+2012+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F&amp;title=PHPUK+2012+Conference+Report&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F03%2F05%2Fphpuk-2012-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/03/05/phpuk-2012-conference-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DPC Radio: Implementing OAuth</title>
		<link>http://techportal.ibuildings.com/2012/02/08/dpc-radio-implementing-oauth/</link>
		<comments>http://techportal.ibuildings.com/2012/02/08/dpc-radio-implementing-oauth/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 11:06:30 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[Lorna Jane Mitchell]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3392</guid>
		<description><![CDATA[Lorna Jane Mitchell With Twitter moving its API to OAuth the idea of using tokens rather than passwords for authentication went mainstream. Many explanations of OAuth make it seem complicated whereas in reality the "OAuth Dance" is a series of simple steps executed in sequence. This talk covers consuming and providing OAuth services, includes implementation [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Lorna Jane Mitchell</strong></p>
<p>With Twitter moving its API to OAuth the idea of using tokens rather than passwords for authentication went mainstream. Many explanations of OAuth make it seem complicated whereas in reality the "OAuth Dance" is a series of simple steps executed in sequence. This talk covers consuming and providing OAuth services, includes implementation examples, and is recommended for all technical leads, architects, and integration specialists.</p>
<p>You can find Lorna's slides at <a href="http://www.slideshare.net/lornajane/oauth-7990565">http://www.slideshare.net/lornajane/oauth-7990565</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F&amp;title=DPC+Radio%3A+Implementing+OAuth" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F&amp;title=DPC+Radio%3A+Implementing+OAuth" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F&amp;title=DPC+Radio%3A+Implementing+OAuth" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F&amp;headline=DPC+Radio%3A+Implementing+OAuth" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Implementing+OAuth&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Implementing+OAuth&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Implementing+OAuth&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Implementing+OAuth&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Implementing+OAuth&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F&amp;title=DPC+Radio%3A+Implementing+OAuth&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F02%2F08%2Fdpc-radio-implementing-oauth%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/02/08/dpc-radio-implementing-oauth/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_010.mp3" length="90604303" type="audio/mpeg" />
		</item>
		<item>
		<title>Announcing the DPC12 CfP (and a Mobile Conference)</title>
		<link>http://techportal.ibuildings.com/2012/01/26/announcing-the-dpc12-cfp-and-a-mobile-conference/</link>
		<comments>http://techportal.ibuildings.com/2012/01/26/announcing-the-dpc12-cfp-and-a-mobile-conference/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 14:40:58 +0000</pubDate>
		<dc:creator>Lorna Mitchell</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[amsterdam]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[dmc]]></category>
		<category><![CDATA[DPC]]></category>
		<category><![CDATA[dpc12]]></category>
		<category><![CDATA[dutch php conference]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3551</guid>
		<description><![CDATA[It's that time of year again; the Dutch PHP Conference has announced its dates (7-9th June 2012) and the call for papers is now open! This year, the conference expands into a new dimension with the addition of a new sister conference, the Dutch Mobile Conference, running alongside DPC. All attendees will get access to [...]]]></description>
			<content:encoded><![CDATA[<p>It's that time of year again; the <a href="http://phpconference.nl">Dutch PHP Conference</a> has announced its dates (7-9th June 2012) and the <strong>call for papers is now open</strong>!</p>
<p>This year, the conference expands into a new dimension with the addition of a new sister conference, the <a href="http://mobileconference.nl">Dutch Mobile Conference</a>, running alongside DPC.  All attendees will get access to both events.  The addition of an additional strand to the conference is a response to the situation as we see it in industry.  Our clients need mobile solutions alongside their web applications, and developers increasingly work across both web and mobile disciplines.</p>
<h3>Call for Papers</h3>
<p>The calls for papers for both events are open now and we'd be delighted to hear from you.  You don't necessarily need previous speaking experience (but tell us if you have), you just need a <strong>great topic</strong> - and for these events, <strong>the more technical, the better!</strong>  The URLs you need to submit your talk are <a href="http://www.phpconference.nl/call-for-papers">http://www.phpconference.nl/call-for-papers</a> and <a href="http://www.mobileconference.nl/call-for-papers">http://www.mobileconference.nl/call-for-papers</a> - we can't wait to see what you come up with, but you need to be quick!  The calls for papers <strong>close on Tuesday 31st January</strong>.</p>
<h3>Come to the Conference!</h3>
<p>Hopefully you've been enjoying our DPCRadio series, where we share the recordings from last year's PHP conference (if not, you can catch up on the <a href="http://techportal.ibuildings.com/dpc-radio/">DPCRadio page</a>).  This year will be bigger and better than ever, and we are sure you'll love the new mobile elements of the event as well - so come and join us, <strong>7th-9th June in sunny* Amsterdam</strong>!</p>
<p>To follow along with the news from both events, follow our twitter accounts <a href="http://twitter.com/DPCon">@DPCon</a> and <a href="http://twitter.com/DMConf">@DMConf</a>.</p>
<p><strong>*</strong> <em>sunshine not guaranteed</em></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F&amp;title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F&amp;title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F&amp;title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F&amp;headline=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F&amp;title=Announcing+the+DPC12+CfP+%28and+a+Mobile+Conference%29&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F26%2Fannouncing-the-dpc12-cfp-and-a-mobile-conference%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/01/26/announcing-the-dpc12-cfp-and-a-mobile-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DPC Radio: Advanced OO Patterns</title>
		<link>http://techportal.ibuildings.com/2012/01/17/dpc-radio-advanced-oo-patterns/</link>
		<comments>http://techportal.ibuildings.com/2012/01/17/dpc-radio-advanced-oo-patterns/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:25:28 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[Factory]]></category>
		<category><![CDATA[object oriented]]></category>
		<category><![CDATA[Signal/Observer]]></category>
		<category><![CDATA[Singleton]]></category>
		<category><![CDATA[Tobias Schlitt]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3363</guid>
		<description><![CDATA[Tobias Schlitt You already know Singleton, Signal/Observer, Factory and friends. But, which object oriented patterns are en vogue in the PHP world and how can you seize their power? This talk gives you an overview on Dependency Injection, Data Mapper and more OO patterns the PHP world talks about right know, using practical code examples. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Tobias Schlitt</strong></p>
<p>You already know Singleton, Signal/Observer, Factory and friends. But, which object oriented patterns are en vogue in the PHP world and how can you seize their power? This talk gives you an overview on Dependency Injection, Data Mapper and more OO patterns the PHP world talks about right know, using practical code examples.</p>
<p>You can find Toby's slides under "Advanced OOP Patterns" here: <a href="http://qafoo.com/presentations.html">http://qafoo.com/presentations.html</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F&amp;title=DPC+Radio%3A+Advanced+OO+Patterns" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F&amp;title=DPC+Radio%3A+Advanced+OO+Patterns" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F&amp;title=DPC+Radio%3A+Advanced+OO+Patterns" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F&amp;headline=DPC+Radio%3A+Advanced+OO+Patterns" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Advanced+OO+Patterns&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Advanced+OO+Patterns&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Advanced+OO+Patterns&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Advanced+OO+Patterns&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Advanced+OO+Patterns&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F&amp;title=DPC+Radio%3A+Advanced+OO+Patterns&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F17%2Fdpc-radio-advanced-oo-patterns%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/01/17/dpc-radio-advanced-oo-patterns/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_001.mp3" length="93688867" type="audio/mpeg" />
		</item>
		<item>
		<title>Are You Making the Most of MySQL?</title>
		<link>http://techportal.ibuildings.com/2012/01/05/are-you-making-the-most-of-mysql/</link>
		<comments>http://techportal.ibuildings.com/2012/01/05/are-you-making-the-most-of-mysql/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 08:11:43 +0000</pubDate>
		<dc:creator>Hilary Boyce</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[explain]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[prepared statements]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[stored procedures]]></category>
		<category><![CDATA[views]]></category>
		<category><![CDATA[zce]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3515</guid>
		<description><![CDATA[Here at Ibuildings, we encourage our developers to continue to develop themselves professionally and to gain relevant certifications. Most have the Zend PHP Certification (ZCE) and some have the Zend Framework Certification (ZFCE) and/or the MySQL Certifications. I have recently been working to gain the MySQL Certified Developer qualification which is taken as two exams; [...]]]></description>
			<content:encoded><![CDATA[<p>Here at Ibuildings, we encourage our developers to continue to develop themselves professionally and to gain relevant certifications.  Most have the Zend PHP Certification (ZCE) and some have the Zend Framework Certification (ZFCE) and/or the MySQL Certifications.  I have recently been working to gain the MySQL Certified Developer qualification which is taken as two exams; each one is an hour and a half and covering a wide range of topics relevant to developing applications with MySQL (there is a separate qualification for administrators).  I found some of the course material pretty easy as I have used it repeatedly over the years but there was plenty that was fairly new to me; some features that I haven’t been using and haven't noticed other PHP developers using or talking about very much.  Having learned more about them, I thought they were worth highlighting.  I’ve enjoyed finding out about these features and look forward to using some of these elements such as subqueries, views and stored procedures effectively in future projects.<span id="more-3515"></span></p>
<p>As developers, we typically think about the application domain problem and logic and then design our architecture and consequently the database tables from that.  We see the database as merely holding the data and our programs as the part that applies logic and processing to that data.  We develop our scripts in isolation from the rest of the finished system and rarely think about their impact on other processes and whether we are making good use of what PHP and MySQL are good at. There may sometimes be excellent reasons for this, but I suspect it is more often the case that:</p>
<ul>
<li>We are not really aware of what MySQL has to offer, or if we are we are not confident in how to use the features.
</li>
<li>The use of ORM (Object Relational Mapping) is growing and this tends to distance us from the actual database and the SQL.  It is perfectly possible now to create an application without writing an SQL query at all.
</li>
<li>We like to keep control in our hands and using some of these features mean the database doing more and our code a lot less which feels threatening.
</li>
<li>We tend to develop in an isolated environment where the only thing running is our script; where we don’t have to worry about competing for resources and speed over a network.  Increasingly our live applications are actually running on a network of servers and complex applications need all the help they can get to meet the requirements of page load times and to avoid contention for resources.
</li>
<li>As PHP developers we traditionally create a single web application with a database back-end that is just used for that application so re-use doesn’t seem such an issue.  However modular or service-level applications are growing; I’ve worked with several of them in recent years.
</li>
</ul>
<p></p>
<p>If all our programs are doing are simple CRUD (Create, Read, Update and Delete) operations on single tables then just using the most basic features of MySQL is probably sufficient, but if it is more complicated then we could be missing out on features that will really improve the performance and resilience of our applications.  We could also save overall development time through re-use of database elements. Our overall aim is to produce fast, reliable, robust applications and we let ourselves and our clients down if we don’t use all the tools at our disposal.</p>
<h2>MySQL Tips and Features</h2>
<p>So what are these features I’m referring to?  I propose to review the options here and then cover a few of them in a bit more detail.  I’ll start with the things that some of you may already be using and then move on to the more obscure.  As a general rule the aims here are to move less data from database to program, to have each query execute as quickly as possible, and to keep our data as secure as we can.</p>
<h3>Fetch a Limited Dataset</h3>
<p>Limiting the number of columns you select, limiting the number of rows with <code>LIMIT</code> and careful use of the <code>WHERE</code> clause all reduce the amount of data being transferred.  Another useful and often underused option is using the <code>GROUP BY</code> clause along with aggregate functions to read summary data, rather than reading a whole dataset and then performing calculations on it in your program.  Imagine you want to get some summary information about a company’s departments and their members of staff.  You could produce a query that reads all the staff records and then process that in your program, but a more efficient approach is to get MySQL to do it for you by using the <code>GROUP BY</code> feature.</p>
<h3>Link Tables Efficiently</h3>
<p>Use <strong>joins</strong> to read from two or more related tables at once.  Inner joins, either explicitly using the <code>JOIN </code>keyword or by listing tables in a comma separated list, get all the records where there is a matching record in each table.  Outer joins (<code>LEFT</code> or <code>RIGHT</code>) select all the records from one of the tables and then the values for the subsequent tables if found, or give NULL values if there are no matches.  There is also a self join for those occasions when you need to compare the values in different rows of the same table.  Joins are a key concept and well worth mastering if you are not already comfortable with them.  What is less well known is that joins can also be useful when doing multiple table updates and deletes, although they are used implicitly with a comma separated list in this context rather than with the keyword <code>JOIN</code>.</p>
<p><strong>Sub-queries </strong>can also be used in a number of ways to create complex queries that select data from a number of tables.  There can be a lot of overlap with joins, in that often the same query can be written using either a join or a sub-query, and a join may well be more efficient.  A sub-query can produce a scalar value for use in an expression, a column of single field results, a single row with several fields or a whole table of data that takes the place of a regular table. To find out more the mysql documentation is to be found at <a href="http://dev.mysql.com/doc/refman/5.5/en/subqueries.html" title="http://dev.mysql.com/doc/refman/5.5/en/subqueries.html"  target="_blank">http://dev.mysql.com/doc/refman/5.5/en/subqueries.html</a>.</p>
<h3>Analyse Your Queries - Can They Be Improved?</h3>
<p>Use MySQL's <strong>explain keyword</strong> when writing your queries to determine the most efficient way to write them when there are alternative ways of doing the same thing.  <code>EXPLAIN</code> analyses the query and shows how many table rows have to be read to produce the output and which indices are used.  Judicious use of indices can improve performance but poor use of them can actually make things worse, so they are worth giving careful thought to if you have sufficient access to/control of the database. Using <code>EXPLAIN</code> can also help you determine if changing the order of tables in a <code>JOIN</code> may improve the efficiency of a query.</p>
<p>It is very simple to use; when you think you have your query written, just run it with <code>EXPLAIN</code> in front of it.  Then try some alternative ways of achieving the same output, or tweak the indices and compare the results.<br />
eg.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">EXPLAIN</span> 
<span style="color: #993333; font-weight: bold;">SELECT</span> staff<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> department<span style="color: #66cc66;">.</span>name<span style="color: #66cc66;">,</span> grade 
<span style="color: #993333; font-weight: bold;">FROM</span> departments <span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> staff <span style="color: #993333; font-weight: bold;">ON</span> department<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> staff<span style="color: #66cc66;">.</span>department_id ;</pre></div></div>

<h3>Use Prepared Statements</h3>
<p>Any security article covering PHP and MySQL will cover the desirability of using the prepared statements feature in PDO (PHP Data Objects) to guard against SQL injection. This is where the query is defined with place holders for changeable parameters which are then bound to it at execution.  It also improves performance if the query is to be run a number of times with different data, as the query is only parsed when prepared rather than every time it is run as with a normal query repeated.  I would view using these wherever possible as mandatory.</p>
<h3>Transfer Data Efficiently</h3>
<p><code>LOAD DATA INFILE </code>(and the accompanying <code>mysqlimport</code> command line tool) is the most efficient way to insert a number of records into a table.  Next time you need to do some sort of bulk import consider whether it is practical to have an appropriately formatted csv file transferred to the server (perhaps by FTP or equivalent ) and then use <code>LOAD DATA INFILE </code>to process it rather than reading it line-by-line in your script and inserting each record individually.  You will have a much faster script that will have less impact on the server.</p>
<h3>Enforce Data Consistency with Triggers and without Network Traffic</h3>
<p><strong>Triggers</strong> are defined statements that are run either before or after <code>INSERT/UPDATE/DELETE</code> operations on a table.  They can be quite complex operations with the use of a block of statements and conditions.  They can save the programmer having to remember to implement this logic each time the data is used and therefore help to force the integrity of the data.  As an example, related records could also be deleted or updated to reflect the change or an entry created in an archive table when a record is deleted.  They tend to have a bad reputation amongst developers; I suspect it is because they instinctively don’t like something they aren’t controlling.  Perhaps if we thought of them in terms of the observer pattern we would be more at ease with them!<br />
eg.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">delimiter <span style="color: #CC0099;">|</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TRIGGER</span> demo 
  BEFORE <span style="color: #990099; font-weight: bold;">INSERT</span> 
  <span style="color: #990099; font-weight: bold;">ON</span> t1
  <span style="color: #990099; font-weight: bold;">FOR EACH ROW</span> 
  <span style="color: #990099; font-weight: bold;">BEGIN</span>
    <span style="color: #990099; font-weight: bold;">SET</span> full_name <span style="color: #CC0099;">=</span> <span style="color: #000099;">CONCAT</span><span style="color: #FF00FF;">&#40;</span>NEW.first_name<span style="color: #000033;">,</span> <span style="color: #008000;">' '</span><span style="color: #000033;">,</span> NEW.last_name<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
    <span style="color: #990099; font-weight: bold;">DELETE</span> <span style="color: #990099; font-weight: bold;">FROM</span> t2 <span style="color: #990099; font-weight: bold;">WHERE</span> code <span style="color: #CC0099;">=</span> NEW.code<span style="color: #000033;">;</span>
  <span style="color: #009900;">END</span><span style="color: #000033;">;</span>
<span style="color: #CC0099;">|</span>
&nbsp;
delimiter <span style="color: #000033;">;</span></pre></div></div>

<h3>Pick the Right Database Engine for Your Tables</h3>
<p>Database Engines are an important element to consider when designing a database. A default engine is set for a database, but can be changed per table. Think about what sort of table you are defining, and don’t just let MySQL default to the MYISAM engine.  MYISAM tables are good for tables largely used for lookup and searches but if it is to be updated frequently the INNODB engine which comes with the option of transactions is a better choice as the use of transactions will improve data integrity.</p>
<h2>Take Advantage of MySQL Views in Your Application</h2>
<p><strong>Views are stored select statements</strong> that can then be used in a query as if it was an ordinary table.  They can select data from tables and also other views using most of the constructs available to any <code>SELECT</code> query.  The only proviso is that there has to be some solid data behind it, so temporary constructs such as user variables and temporary tables are not available in views. The <code>SELECT</code> statement in the view is actually run when the view is used in a query; either the <code>SELECT</code> criteria merged with those of that query or run first to produce a temporary table which is then queried further by the end query.</p>
<p>Views can also be used to hide table structure changes, such as a table split into two.  A view could be created with the old table name and effectively the same data, and then users would be able to query that as before without disruption.</p>
<p>Views particularly come into their own when reports are being generated.  The view can be designed to select the base data the report(s) are based on, and then a report query can select and perform calculations based on this set of data - without the writer of that query having to know all the ins and outs of where the data is obtained.  If the temporary table option is used then the underlying data tables are not being tied up for longer than necessary and are free for other users.  A standard <strong>temporary table</strong> could be created for the same purposes but that has the disadvantage of being more likely to get out of date and using a view also means that the SQL for creating the "temporary table" is kept in the database and is accessible by all users with the relevant permission.  Depending on the exact circumstances, this may or may not be appropriate.</p>
<p>To illustrate a view in action (although there are doubtless better ways of achieving what this does!)</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">ALGORITHM</span> <span style="color: #CC0099;">=</span> <span style="color: #990099; font-weight: bold;">TEMPTABLE</span> <span style="color: #990099; font-weight: bold;">VIEW</span> engineering_staff <span style="color: #FF00FF;">&#40;</span>name<span style="color: #000033;">,</span> location<span style="color: #000033;">,</span> grade<span style="color: #000033;">,</span> manager_id<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">AS</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #000099;">CONCAT</span><span style="color: #FF00FF;">&#40;</span>staff.firstname<span style="color: #000033;">,</span> <span style="color: #008000;">' '</span><span style="color: #000033;">,</span> staff.lastname<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span> department.location<span style="color: #000033;">,</span> staff.grade<span style="color: #000033;">,</span> staff.manager_id<span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">FROM</span> department <span style="color: #000099;">LEFT</span> <span style="color: #990099; font-weight: bold;">JOIN</span> staff <span style="color: #990099; font-weight: bold;">on</span> department.id <span style="color: #CC0099;">=</span> staff.department_id
<span style="color: #990099; font-weight: bold;">WHERE</span> department.name <span style="color: #CC0099;">=</span> <span style="color: #008000;">'Engineering'</span><span style="color: #000033;">;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">SELECT</span> name<span style="color: #000033;">,</span> location<span style="color: #000033;">,</span> grade
<span style="color: #990099; font-weight: bold;">FROM</span> engineering_staff
<span style="color: #990099; font-weight: bold;">WHERE</span> grade <span style="color: #CC0099;">&gt;</span> <span style="color: #008080;">5</span>
<span style="color: #990099; font-weight: bold;">ORDER BY</span> grade<span style="color: #000033;">;</span></pre></div></div>

<p>If there is a clear one-to-one correlation between a view’s output rows and the underlying data then views can also be used in <code>UPDATE</code> and <code>DELETE</code> statements.</p>
<h2>Procedures and Functions in MySQL</h2>
<p>A few years ago, before joining Ibuildings, I spent some months working on a major application that used PHP with the Oracle database and the application made very heavy use of Oracle's procedures and functions; the SQL in the code itself was largely confined to call statements to use the procedures.  This functionality was new to me as it wasn’t available in MySQL at that time (it was introduced with version 5), so MySQL developers don’t have a history of using these in the same way that users of other databases do.</p>
<p>The MySQL documentation defines a stored routine as:</p>
<blockquote><p><em>A stored routine is a set of SQL statements that can be stored in the server. Once this has been done, clients don't need to keep reissuing the individual statements but can refer to the stored routine instead.<br />
</em></p></blockquote>
<p>It is effectively a mini SQL program that is stored in the database; it has inputs, outputs and processing. Stored Routines is a term used to refer to two constructs that have many similarities but also some important differences. </p>
<p>Whilst MySQL provides a <strong>wide range of built in functions</strong> such as <code>CONCAT()</code> or <code>YEAR()</code>, it is also possible to <strong>write your own</strong>.  Just like stored procedures, they can take input parameters and do some complicated processing but they must return a single value of a declared type.  A function is used in an expression within an SQL statement just as the built-in functions are, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> id<span style="color: #66cc66;">,</span> name<span style="color: #66cc66;">,</span> MYFUNC<span style="color: #66cc66;">&#40;</span>grade<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> dept <span style="color: #993333; font-weight: bold;">FROM</span> staff <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> name;</pre></div></div>

<p>A stored procedure is more complex, it has both input and output parameters and the results of a <code>SELECT</code> statement are returned to the calling code if not part of a cursor, just as with a standard <code>SELECT</code> query.  It is actioned by using the <code>CALL</code> statement.  Quite simply it would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CALL</span> my_procedure<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<h3>What do Stored Procedures Have to Offer?</h3>
<p>In a nutshell:</p>
<ul>
<li>You can write considerably more complicated SQL than in a simple query, expressing more complex logic.  There are control structures available, such as if/else and loops. With cursors you can iterate through the output of a SELECT statement.
</li>
<li>By doing the logic processing within the database less data needs to be transferred from the database server, improving performance, although it does make more demands on the database server’s memory.
</li>
<li>There is error handling available, so a failure doesn’t have to be a show-stopper, improving robustness.
</li>
<li>The code can be re-used by a range of applications and each developer does not have to re-invent the wheel.  With the use of parameters both in and out the procedures can be written to be context dependent, increasing their flexibility and usefulness.
</li>
<li>As with the client/server contract between classes the calling program doesn’t have to know how the database is organised so it is easier to change this without breaking applications or spending a considerable amount of time tracking down where the data is used.
</li>
<li>The procedure can be written to use the privileges of the user who creates it so enabling securer use of sensitive data which can be processed without being returned to the client and without the script’s users needing to have the level of privileges needed to access the data directly.
</li>
</ul>
<p></p>
<p>How to write a stored procedure is a tutorial subject in it's own right, so I don't propose to go into it here. The mysql documentation at <a href="http://dev.mysql.com/doc/refman/5.5/en/create-procedure.html" title="http://dev.mysql.com/doc/refman/5.5/en/create-procedure.html" target="_blank">http://dev.mysql.com/doc/refman/5.5/en/create-procedure.html</a> is a useful starting point.</p>
<p>There are many different options for using MySQL with PHP; here I will give a quick example of calling a stored procedure from PHP using PDO, which is my preferred method.  Suppose we had a stored procedure which takes an input string, does some clever stuff with some tables and then returns a single output value and a set of records from a select within the routine.  In PHP you might see something like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PDO<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mysql:dbname=test;host=localhost'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'testuser'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'testpassword'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CALL my_procedure(‘input string’, @output);&quot;</span><span style="color: #009900;">&#41;</span>
                  <span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchAll</span><span style="color: #009900;">&#40;</span>PDO<span style="color: #339933;">::</span><span style="color: #004000;">FETCH_ASSOC</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT @output;&quot;</span><span style="color: #009900;">&#41;</span>
                       <span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchAll</span><span style="color: #009900;">&#40;</span>PDO<span style="color: #339933;">::</span><span style="color: #004000;">FETCH_ASSOC</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Getting the results of the select will look familiar, but getting the output value is a bit more complicated this makes use of MySQL’s user variables - denoted by <code>@</code>. This can be initialised beforehand with a SET query (<code>SET @output := 0;</code>).  However using it without prior initialisation will initialise it to null and then the procedure populates it with a value.  To get the contents of a user variable you need to select it.</p>
<h2>Making the Most of MySQL</h2>
<p>Although this has been a lightening tour, I hope I've given you a taste of the features in MySQL that I'll be using in my applications in the future - and that I've whetted your appetite to find out more about them and to be more adventurous with MySQL.  If there's a particular feature that you think belongs on the list, or you can personally recommend a tutorial site, then leave us a comment and tell us what it is and why!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F&amp;title=Are+You+Making+the+Most+of+MySQL%3F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F&amp;title=Are+You+Making+the+Most+of+MySQL%3F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F&amp;title=Are+You+Making+the+Most+of+MySQL%3F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F&amp;headline=Are+You+Making+the+Most+of+MySQL%3F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Are+You+Making+the+Most+of+MySQL%3F&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Are+You+Making+the+Most+of+MySQL%3F&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Are+You+Making+the+Most+of+MySQL%3F&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Are+You+Making+the+Most+of+MySQL%3F&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Are+You+Making+the+Most+of+MySQL%3F&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F&amp;title=Are+You+Making+the+Most+of+MySQL%3F&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2012%2F01%2F05%2Fare-you-making-the-most-of-mysql%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2012/01/05/are-you-making-the-most-of-mysql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>DPC Radio: Profiling PHP Applications</title>
		<link>http://techportal.ibuildings.com/2011/12/14/dpc-radio-profiling-php-applications/</link>
		<comments>http://techportal.ibuildings.com/2011/12/14/dpc-radio-profiling-php-applications/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 09:57:21 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[derick rethans]]></category>
		<category><![CDATA[optimising]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PHP applications]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[xdebug]]></category>
		<category><![CDATA[xhprof]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3402</guid>
		<description><![CDATA[Derick Rethans The web is full of useful advice focussed on pushing out the last bit of performance of your code. They mention trivial changes. like changing every occurrence of print with echo even suggesting to use for instead of foreach. These optimisations help, but you are not going to notice it unless they're in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Derick Rethans</strong></p>
<p>The web is full of useful advice focussed on pushing out the last bit of performance of your code. They mention trivial changes. like changing every occurrence of print with echo even suggesting to use for instead of foreach. These optimisations help, but you are not going to notice it unless they're in a tight loop with many iterations. It is also a wrong approach for tackling performance issues. Before you can optimise, you need to find out if your codeis actually slow; then you need to *understand* the code; and *then* you need to find out where you can optimise it. This talk introduces tools and concepts to optimise the optimisation of your PHP applications.</p>
<p>You can find Derick's talk slides <a href="http://derickrethans.nl/talks/profiling-dpc11.pdf">over on his site</a> [PDF]</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F&amp;title=DPC+Radio%3A+Profiling+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F&amp;title=DPC+Radio%3A+Profiling+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F&amp;title=DPC+Radio%3A+Profiling+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F&amp;headline=DPC+Radio%3A+Profiling+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Profiling+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Profiling+PHP+Applications&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Profiling+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Profiling+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Profiling+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F&amp;title=DPC+Radio%3A+Profiling+PHP+Applications&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F12%2F14%2Fdpc-radio-profiling-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/12/14/dpc-radio-profiling-php-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_015.mp3" length="48234937" type="audio/mpeg" />
		</item>
		<item>
		<title>DPC Radio: Distributed Couch Apps - Embracing eventual consistency</title>
		<link>http://techportal.ibuildings.com/2011/11/21/dpc-radio-distributed-couch-apps-embracing-eventual-consistency/</link>
		<comments>http://techportal.ibuildings.com/2011/11/21/dpc-radio-distributed-couch-apps-embracing-eventual-consistency/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 14:30:26 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[dpc11]]></category>
		<category><![CDATA[Kore Nordmann]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[qafoo]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3371</guid>
		<description><![CDATA[Kore Nordmann CouchDB is a prominent representative of the NoSQL movement. Using its integrated web server and eventual consistent replication you can not only distribute data, but also full application code. This even works for clients which are not always connected to the internet, like e.g. mobile devices. This session gives you an insight Couch [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Kore Nordmann</strong></p>
<p>CouchDB is a prominent representative of the NoSQL movement. Using its integrated web server and eventual consistent replication you can not only distribute data, but also full application code. This even works for clients which are not always connected to the internet, like e.g. mobile devices. This session gives you an insight Couch apps, their beauty and pitfalls.</p>
<p>You can find Kore's slides over on <a href="http://talks.qafoo.com/">http://talks.qafoo.com/</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F&amp;title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F&amp;title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F&amp;title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F&amp;headline=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F&amp;title=DPC+Radio%3A+Distributed+Couch+Apps+-+Embracing+eventual+consistency&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F21%2Fdpc-radio-distributed-couch-apps-embracing-eventual-consistency%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/11/21/dpc-radio-distributed-couch-apps-embracing-eventual-consistency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_006.mp3" length="82204155" type="audio/mpeg" />
		</item>
		<item>
		<title>DPC Radio: Developing and Deploying High Performance PHP Applications</title>
		<link>http://techportal.ibuildings.com/2011/11/10/dpc-radio-developing-and-deploying-high-performance-php-applications/</link>
		<comments>http://techportal.ibuildings.com/2011/11/10/dpc-radio-developing-and-deploying-high-performance-php-applications/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 11:15:41 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[Christopher Jones]]></category>
		<category><![CDATA[dpc11]]></category>
		<category><![CDATA[high performance php applications]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3369</guid>
		<description><![CDATA[Christopher Jones This session starts with a brief but important overview about the growing Oracle technology eco-system. It shows what Oracle's direction means for PHP application development and deployment. The majority of the talk then highlights techniques on building high performance PHP applications with the very widely used Oracle Database. Techniques include connection pooling, application [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Christopher Jones</strong></p>
<p>This session starts with a brief but important overview about the growing Oracle technology eco-system. It shows what Oracle's direction means for PHP application development and deployment.</p>
<p>The majority of the talk then highlights techniques on building high performance PHP applications with the very widely used Oracle Database. Techniques include connection pooling, application monitoring, automatic data privacy for PHP application users, online application upgrades, caching for performance, and how to suspend and resume database transactions to effectively build stateful web applications.</p>
<p>You can find Chris' slides <a href="http://www.oracle.com/technetwork/topics/php/highperf-php-preso-405765.pdf">on oracle's technetwork</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F&amp;title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F&amp;title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F&amp;title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F&amp;headline=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F&amp;title=DPC+Radio%3A+Developing+and+Deploying+High+Performance+PHP+Applications&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F11%2F10%2Fdpc-radio-developing-and-deploying-high-performance-php-applications%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/11/10/dpc-radio-developing-and-deploying-high-performance-php-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_005.mp3" length="50101613" type="audio/mpeg" />
		</item>
		<item>
		<title>Architecture Patterns: Domain Model and Friends</title>
		<link>http://techportal.ibuildings.com/2011/10/31/architecture-patterns-domain-model-and-friends/</link>
		<comments>http://techportal.ibuildings.com/2011/10/31/architecture-patterns-domain-model-and-friends/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 07:53:34 +0000</pubDate>
		<dc:creator>Robert Raszczynski</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[domain model]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[mapper]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3421</guid>
		<description><![CDATA[Imagine a workshop of a racing team. The very first thing you will notice is that everything has its own place; spanners hanging on walls sorted by size, other tools placed in drawers, divided by their purpose, bolts and nuts placed in separate dividers and once again sorted by size. Everything is labeled, clean and [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine a workshop of a racing team. The very first thing you will notice is that everything has its own place; spanners hanging on walls sorted by size, other tools placed in drawers, divided by their purpose, bolts and nuts placed in separate dividers and once again sorted by size. Everything is labeled, clean and in order. Now imagine how would it be to work in such an environment, where every single item has its specific place. I reckon that after the first few days, you would be able to point to where everything is with your eyes closed! Such a degree of segregation and organisation makes our lives much easier and it's a pleasure to work with. </p>
<p><a href="http://www.flickr.com/photos/tahini/4047928459/"><img alt="tools wall by Mr Thinktank, on Flickr" src="http://farm3.static.flickr.com/2773/4047928459_b0b07d74a5_m.jpg" class="alignright" width="240" height="180" /></a></p>
<p>Architectural and design patterns help software architects to break systems in to smaller, more maintainable sections organised by their functionality and usage. The biggest benefit of patterns is that someone has already solved problems we may face and by utilising patterns such as Transactional Script, Domain Model or Data Mapper in your application it gives us, as developers, some good guidelines on how it should be designed. <span id="more-3421"></span></p>
<p>Now take a a look at the code in your current project. Is it as well organised as that workshop? Is every class grouped by its purpose, in a nicely organised directory structure? I suspect most of us will answer "just about" to these questions. Most web applications are built of various subsystems, where each one is responsible for different things, such as reading from and writing to a database, retrieving data from a feed, and so on. It's exactly the same as in the workshop, different parts of the system have different purposes; hence they should be grouped in layers. Think about a cake and how it is layered, with sponge at the bottom, jam and cream on the top.</p>
<p>Subsystems, with different responsibilities, are arranged in layers, where each one rests on the layer below it. Higher layers use APIs or services provided by the lower layer, however this lower layer is completely unaware of the fact that there is a layer above it - and it hides another lower placed layer from the layer above. Such architecture encourages separation and decreases coupling between different parts of a system.</p>
<p>There are three major layers in software architecture:</p>
<ul>
<li><b>presentation</b> - the layer contains all the logic responsible for handling interactions between the systems and an user, whether by using GUI or command line. The layer is responsible for displaying information to the user and collecting user input that is passed to domain logic.</li>
<li><b>domain</b> - the domain logic layer is also referred as business logic. This layer is the workhorse of an application, it does all the work the application needs to do. The domain logic does calculations on users’ input or stored data. It passes the data to data source layer so it can be persist, furthermore, the layer validates input passed from the presentation layer. </li>
<li><b>data source</b> - the layer’s purpose is mainly to communicate with other systems, such as databases, messaging systems and transaction managers. In web applications the major communication will be with different database systems.</li>
</ul>
<p></p>
<p>Now that we know what types of layers we can find in software architecture, let's have a look at how we can organize domain logic and data sources layers. </p>
<h3>Organizing Domain Logic</h3>
<p>There are three main design patterns that help us to organize domain logic; these are <strong>transaction script</strong>, <strong>table module </strong>and <strong>domain model</strong>.  The following sections will take each of these patterns in turn and examine their suitability for application in various situations. </p>
<h4>Transaction Script</h4>
<p>The transaction script pattern is the simplest solution for organizing domain logic. There is a collection of scripts that are executed on a server, and every script handles a single procedure that corresponds to a specific request made by a user or another system. The procedure may involve taking user input from the presentation layer, validating it and then storing the data in a database or passing it to external services.  </p>
<p>If you have been using PHP for a while, you may remember the way websites were built in the late 90s and around the beginning of the millennium. You had a massive set of scripts, named as <code>guestbook.php</code>, <code>add_entry.php</code>, and <code>view_entry.php</code>, and each of them did one job. In our example scripts, would present all guest book entries, add a new entry to the guest book and display one single entry.</p>
<p>Transaction script is an ideal solution for systems with only a small amount of logic, because it is very easily understood by developers, it has little performance overhead and it performs well with an elementary data source layer when put into action with patterns such as <strong>Row Data Gateway</strong> or <strong>Table Data Gateway</strong>. However, you will discover transaction script's disadvantages as soon as the complexity of your domain logic increases. Quite often various transactions must perform similar actions, which leads to duplication of code across them. Some of the code can be refactored into separate classes or functions, however it gets harder and harder to keep the application's structure well-organised as the complexity grows.</p>
<h4>Table Module</h4>
<p>The next design pattern for organizing domain logic is Table Module. It presents a database-centric approach; all the business logic is organised around database tables. In Table Module, a single class encapsulates all the domain logic for all records stored in a table or view. It's important to note that there is no translation of data between objects and rows, as it happens in Domain Model, hence implementation is relatively simple when compared to the Domain Model pattern (which is next on the list). Table Module provides an interface to perform operations on all the data, so every time there is a need to work on a particular row, a method expects some kind of identity reference to be passed as one of the parameters.</p>
<p>As mentioned before, Table Module is much simpler than Domain Model, making it an ideal middle ground solution between Transaction Script and Domain Model. With Table Module you gain much more structure and lower level of code duplication comparing to Transaction Script, because the domain logic is organized around tables rather than procedures. Table Module is an ideal candidate when an application makes heavy use of tabular data, which normally is a result of a SQL call, because it supports a Record Set pattern very well. However, if your application requires direct instance to instance relationship, then Domain Model will be much more appropriate choice as it better handles complicated domain logic.</p>
<h4>Domain Model</h4>
<p>The third and more complex solution for organizing domain logic is a design pattern called Domain Model. The pattern provides an object-oriented way of dealing with complicated logic. Instead of having one procedure that handles all business logic for a user action, there are multiple objects and each of them handles a slice of domain logic that is relevant to it. When you start building a model of your application's domain, which in fact is an abstract representation of reality, you will find that initial classes are organised essentially around the nouns in the domain. For instance, when you build an e-commerce solution you will end up with classes such as <em>Customer</em>, <em>Basket</em>, <em>Category</em> and <em>Product</em>; these are the first things you will discuss when thinking about the domain. In a nutshell, each of the classes will incorporate both the data, mainly represented in form of attributes, and all the behaviour that is related to that data. Additionally, Domain Model objects are usually in a one-to-one relationship with records in database tables.</p>
<p>Domain Model is built out of small, loose objects with elegant interfaces, that stay completely free of any external dependencies. Persisting data in Domain Model can be done by implementation of the Data Mapper pattern; this is a great fit, but it will raise the level of complexity. It helps to deal with highly complex business logic in well organised manner, however, it also requires an object-oriented paradigm shift from developers wanting to use it. In fact the Domain Model pattern has a very steep learning curve and the process itself may be very frustrating and time consuming for people new to a rich object model. They can find themselves in a situation where they spend more time jumping from class to class looking for the behaviour they are interested in.</p>
<p>Taking a decision on whether to use Domain Model is highly dependent on the complexity of the business logic. Domain Model handles increasing complexity very well, however, it may take months before developers are fully confident working with the pattern.</p>
<h3>Choosing the right solution for domain logic of your application</h3>
<p>So far we have looked at three architecture design patterns that will help you to organize domain logic. However, the big question is <strong>which pattern you should pick for your application</strong>. Unfortunately, there is no straight answer. The decision-making process will be mainly based on judging the complexity of the application's domain logic. The rule will be that you would pick Transaction Script for applications with a lower complexity level and Table Module or Domain Model for applications where the business logic is more demanding. In general you wouldn't use Domain Model pattern for systems with simple domain logic, because the cost of understanding it and complexity of data source exceeds the benefit of this pattern. At the same time you need to consider changing requirements and how they may influence your application. Transaction Script and Table Module will definitely hit a wall much faster than Domain Model when the complexity of the business logic is increased by adding more features. Below is a chart representing relationship between complexity of domain logic and effort needed to introduce new features.</p>
<p><img src="http://techportal.ibuildings.com/wp-content/uploads/2011/10/graph.png" alt="graph showing complexity and effort" width="635" height="469" class="alignnone size-full wp-image-3457" /></p>
<p><strong>Relationship between effort and complexity for different domain logic architecture design patterns.<br />
Source: <a href="http://www.amazon.com/gp/product/0321127420/ref=as_li_ss_tl?ie=UTF8&amp;tag=lorn-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399369&amp;creativeASIN=0321127420">Patterns of Enterprise Application Architecture</a><img src="http://www.assoc-amazon.com/e/ir?t=lorn-20&amp;l=as2&amp;o=1&amp;a=0321127420&amp;camp=217145&amp;creative=399369" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" /> by Martin Fowler.</strong></p>
<p>Remember that even after you take your decision there may be new requirements that could change the application's complexity. In such circumstances it may be worthwhile to upgrade your chosen pattern, for instance refactor Transaction Script to Domain Model. However it won't make sense, in most situations, to go from Domain Model to Transaction Script.</p>
<p>Remember also that there is no rule to say you have to pick one pattern only; you can combine them in your design.  It is common to delegate some business logic to Transaction Script and then use Domain Model or Table Module for other domain logic.</p>
<h3>Organizing Data Source Layer</h3>
<p>The main purpose of the data source layer is to communicate with other systems and to retrieve/persist data. When working with PHP you will find that the data source layer will usually connect to some sort of database. It is desirable, as a good coding practise, to separate database access and all SQL queries from domain logic and place it in separate classes. In most cases classes are organised around the table structure of the database, with each class corresponding to a table. It’s worth mentioning that your choice of data source pattern will be affected by which design solution you chose for the domain logic.  Let's have a look at some options:</p>
<h4>Gateway</h4>
<p>When classes are based on table structure of the database, they act as a gateway to the table, encapsulating the SQL and database connection from any domain logic or presentation. There are two types of gateways: <strong>Row Data Gateway </strong>and <strong>Table Data Gateway</strong>.</p>
<h5>Row Data Gateway</h5>
<p>A class implementing Row Data Gateway pattern contains only data source logic, such as database access and simple conversion from database to in-memory types. An object looks exactly like a record in a table or a view, with each column mapped to a property.</p>
<p>Row Data Gateway should never include any of the business logic. If that's the case then it really an <strong>Active Record </strong> pattern instead.</p>
<h5>Table Data Gateway</h5>
<p>An instance of Table Data Gateway handles and encapsulates all the SQL used to access and modify all the rows in a single table or a view. The class usually provides a simple interface that includes multiple methods for finding data based on a condition, as well as some insert, update and delete methods. Each of the methods will map input parameters into SQL queries and then execute them against database connection.</p>
<p>Table Data Gateway always creates a record set when it returns data retrieved from database, even when there was just a simple find by primary key method executed. That makes the pattern very well suited to work with the Table Module pattern.</p>
<p><b>Editor's Note: </b>Keep reading for code examples including Table Data Gateway.</p>
<h4>Data Mapper</h4>
<p>Very often, domain objects will have some attributes, for instance collections, that are not part of the database schema. This mismatch requires some sort of mechanism that helps structuring and transferring data between the domain logic and the database. This is exactly what Data Mapper does - it is a layer that separates the business logic from the database by moving data from one to the other. A simple implementation of Data Mapper would just map table columns to equivalent attributes of a domain class.</p>
<p>The great benefit of using Data Mapper is the fact that domain objects don't need to know that there is a database present, making it easy to introduce changes to database structure or domain logic. Additionally, the entire Data Mapper layer can be easily substituted with mocks and stubs for testing purposes.</p>
<p>Data Mapper is mostly used together with Domain Model, and we will go on to look at a <strong>code example</strong> of using these together.</p>
<h3>Patterns in Practise</h3>
<p>I would like to present an example showing how you can combine Data Logic and Data Source using design patterns mentioned in the article. I will mainly focus on Domain Model, Data Mapper and Table Data Gateway patterns. For the purpose of this example lets assume that we need to build ecommerce web application.</p>
<h4>Domain Model  </h4>
<p>While analysing requirements you will notice that there are few nouns you talk about repeatedly. It’s your <em>Customer</em>, a <em>Product</em> the customer looks for, and a <em>Basket</em> where the product gets added to by the customer. These three are your domain specific classes. Lets start writing some code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Store<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Customer
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$name</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$address</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Store<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">class</span> Product
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$name</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$description</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$price</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Store<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">class</span> Basket
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * @var ArrayObject collection of products added to basket
     */</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$products</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$customer</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Each of the above classes will include some business logic specific to its domain. The Customer class may have methods for managing shipping address and financial details, the Product class may have methods that calculate taxes or discounts, and so on . The key is to keep these classes small and compact. </p>
<h4>Data Mapper</h4>
<p>As mentioned before, Data Mapper is used to move data between layers. For the purpose of this example we will have three database tables <code>customers</code>, <code>products</code> and <code>baskets</code>. Based on our domain model we know that we need to feed data into three objects, so the mappers we create will map data from the <code>customers</code> table to the <code>\Store\Customer</code> class, from <code>products</code> to <code>\Store\Product</code>, and lastly, from <code>baskets</code> to <code>\Store\Basket</code>. Below is a starting point for <code>\Store\Data\Mapper\Customer</code> data mapper; all the other classes will look pretty similar at this early stage.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Store\Data\Mapper<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Customer
<span style="color: #009900;">&#123;</span>
    <span style="color: #009933; font-style: italic;">/**
     * @var \ArrayObject
     */</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$identityMap</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * @var \Store\Data\Gateway
     */</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$gateway</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * By using dependency injection it is much easier to unit test your mapper
     *
     * @param \Store\Data\Gateway $gateway
     * @param \ArrayObject $identityMap
     * @return void
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span>\Store\Data\Gateway <span style="color: #000088;">$gateway</span><span style="color: #339933;">,</span> \ArrayObject <span style="color: #000088;">$identityMap</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">gateway</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$gateway</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">identityMap</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$identityMap</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 constructor takes two parameters, first is an instance of <code>\Store\Data\Gateway</code> that implements the <strong>Table Data Gateway</strong> pattern. I decided to use the pattern here because it provides additional separation, however, it is entirely up to you how to handle SQL. The second parameter is instance of <code>ArrayObject</code> that acts as an <strong>Identity Map</strong>, which is used by the mapper’s find methods to ensure that every object is loaded only once. Lets have a look how it works:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Store\Data\Mapper<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Customer
<span style="color: #009900;">&#123;</span>
    <span style="color: #339933;">...</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * finds customer’s row by primary key
     *
     * @param int $id
     * @return \Store\Customer
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> find<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;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">identityMap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetExists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</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;">identityMap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetGet</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: #666666; font-style: italic;">// By using Table Data Gateway we hide away all SQL</span>
        <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">gateway</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFirstItem</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$customer</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> \Store\Customer<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Simple mapping of data from Db to Domain Model</span>
        <span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setId</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: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setName</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAddress</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'address'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Store customer object in identity map</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">identityMap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetSet</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$customer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// And return Customer object</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$customer</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The first thing the find method does is a check whether data has been already loaded from database. If not, the mapper gets the data by using Table Data Gateway and maps it to the domain object. In my example it's a very simple mapping which links column to attribute, however, you can implement more sophisticated, metadata based mapping should you need it.</p>
<p>Lets have a look at how data is persisted when using Domain Model and Data Mapper.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Store\Data\Mapper<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Customer
<span style="color: #009900;">&#123;</span>
    <span style="color: #339933;">...</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * save
     *
     * @param \Store\Customer $customer
     * @return void
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> save<span style="color: #009900;">&#40;</span>\Store\Customer <span style="color: #000088;">$customer</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Simple mapping of domain model to table columns</span>
        <span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'address'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAddress</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">gateway</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">update</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$customer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</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: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">gateway</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Data Mapper has a <code>save()</code> method that expects an object of the domain model, in this case <code>\Store\Customer</code>. Once again the mapper prepares data and passes it to the database using a Table Data Gateway pattern. The code here is for <code>Customer</code> only but the concept applies to all domain model objects.</p>
<p>I hope that above example will help you analyse the requirements of your next project, and if you decide that these patterns are a good fit, that you will be able to introduce Domain Model, Data Mapper and Table Data Gateway easily.  Are you using these patterns or planning on using them for the next project?  Leave us a comment and let us know where they fit in your current or future applications!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F&amp;title=Architecture+Patterns%3A+Domain+Model+and+Friends" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F&amp;title=Architecture+Patterns%3A+Domain+Model+and+Friends" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F&amp;title=Architecture+Patterns%3A+Domain+Model+and+Friends" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F&amp;headline=Architecture+Patterns%3A+Domain+Model+and+Friends" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Architecture+Patterns%3A+Domain+Model+and+Friends&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Architecture+Patterns%3A+Domain+Model+and+Friends&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Architecture+Patterns%3A+Domain+Model+and+Friends&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Architecture+Patterns%3A+Domain+Model+and+Friends&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Architecture+Patterns%3A+Domain+Model+and+Friends&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F&amp;title=Architecture+Patterns%3A+Domain+Model+and+Friends&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F31%2Farchitecture-patterns-domain-model-and-friends%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/10/31/architecture-patterns-domain-model-and-friends/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHPNW11 Conference Report - Part II</title>
		<link>http://techportal.ibuildings.com/2011/10/27/phpnw11-report-part-ii/</link>
		<comments>http://techportal.ibuildings.com/2011/10/27/phpnw11-report-part-ii/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 13:19:41 +0000</pubDate>
		<dc:creator>Marco De Bortoli</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[phpnw11]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3443</guid>
		<description><![CDATA[This is the second part of our PHPNW11 conference review. Check out the previous part here. Tutorial Day The conference started on Friday with its first ever tutorial day. I attended the "Security" tutorial by Arne Blankerts as it's very relevant for the project I'm working on at the moment. The talk was very enjoyable, [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is the second part of our <a href="http://conference.phpnw.org.uk/phpnw11/">PHPNW11 conference</a> review. Check out the previous part <a href="http://techportal.ibuildings.com/2011/10/20/phpnw11-conference-report/">here.</a></em></p>
<h2>Tutorial Day</h2>
<p>The conference started on Friday with its first ever tutorial day. I attended the <strong>"Security"</strong> tutorial by Arne Blankerts as it's very relevant for the project I'm working on at the moment. The talk was very enjoyable, especially because for the first time someone put emphasis not only on the software security aspect, but also on the hardware and the physical access control policy. You can put all your efforts and apply all the best practices to make your software secure, but everything can vanish in a moment if anyone can access your data centre without restrictions. My colleague Marco Lopes has reviewed this tutorial in more detail in his <a href="http://techportal.ibuildings.com/2011/10/20/phpnw11-conference-report/">PHPNW11 report</a>.</p>
<p>The second tutorial I attended was <strong>"Maintainable Applications in PHP Using Components"</strong> by Stuart Herbert. It was his first time delivering this content and I have to say he did it in an awesome way. Despite the network connection problems we had (which delayed the tutorial a bit), we got along very well by the time everyone had their environment setup. Stuart's tutorial was full of hands-on code. This course was not only a lot of fun and laughs, but interesting content too. I'm looking forward to using Phix to create my components repository, maybe pairing its workflow with the chef-based one we are already adopting at Ibuildings. Definitely a thumbs up for Stuart's project.</p>
<h2>Main Conference</h2>
<p><span id="more-3443"></span>Ian Barber delivered the PHPNW11 opening keynote - an inspiring talk that gave us all the motivation to get back on track and contribute more to the community.</p>
<p>The day continued with Ben Longden's talk on <strong>"REST and the Hypermedia Constraint: A Case Study"</strong>. Ben showed us how constraints are not necessarily bad, but instead can help you improve the way you implement your software. Talking about REST, he clearly demonstrated how the Hypermedia constraint can be very useful for de-coupling the server, provisioning the information and the client consuming it, reiterating what is REST and what is a RESTful API.</p>
<p><a href="http://www.flickr.com/photos/stuartherbert/6232003798/in/photostream"><img alt="" src="http://farm7.static.flickr.com/6050/6232003798_f97a9e7b31.jpg" title="REST and HateOAS Talk by Ben Longden (c) Stuart Herbert" class="alignright" width="500" height="338" /></a></p>
<p>Following this, I was in the mood for a bit of PHP internals - and who better than Derick Rethans to talk about them? The talk title <strong>"PHP Extensions, why and what?"</strong> as expected wasn't about how to write extensions but about what they are and how they differ from components (and why and when you should prefer them to anything else). A very insightful talk; I'm now eager to write my own extension, with a better understanding of how they can be improved and how conceptually they should be taken into account.</p>
<p>I started my afternoon with Alistair Stead's talk titled <strong>"Varnish your PHP application, make it fly!"</strong>, trying to gather more information and key points to convince the client I'm currently working for that it's time to seriously think about replacing Squid in favour of Varnish. Alistair is probably one of my favourite speakers; he gave a very well presented talk that covered caching concepts, mechanics and how Varnish can make your life easier. The winning point for most of the audience, myself included, was showing some numbers and graphs from a real use case which left people drooling at the idea of getting the same results with a proper caching strategy implementation.</p>
<p><a href="http://www.flickr.com/photos/stuartherbert/6232033132/in/photostream"><img alt="" src="http://farm7.static.flickr.com/6163/6232033132_26970170fc.jpg" title="Alistair Stead talking about Varnish (c) Stuart Herbert" class="alignright" width="500" height="332" /></a></p>
<p>BDD is rapidly taking its place amongst the common list of developers' best practices. Ben Waine's talk titled <strong>"Acceptance &#038; Integration Testing Using Behat"</strong> brought his experience directly from the Sky Bet company field where Behat is commonly used to coordinate BAs, testers and developers in the most effective way. The talk went through the use of Gherkin, the language Behat uses, to defining its test scenarios down to the Phabric library used to define fixtures "on the fly" - once again using Gherkin tables saving you the pain of dealing with it. It also maintains all the SQL scripts used. All in all, a lightweight, well-presented talk, good for those who are not that much into the BDD concept.</p>
<p>To complete the first day I attended Thijs Feryn's talk <strong>"CLI, the other SAPI"</strong>. Why? Well, as a command line warrior I'm particularly interested in exploring PHP's potential as a command line tool. It emerged during the talk that using PHP from the command line is not just useful for batch processing or scripting, but also for a development tool, testing your models and your code behaviour straight from the command line - this is not to be underestimated. What I enjoyed most about the talk was Thijs' approach: he involved the audience in the talk, testing attendees' knowledge with some simple command line snippets and asking people for the expected results. This was one of my favourite talks; if you have the chance to see it in the future, don't miss it.</p>
<p>Day 2, Sunday, was perhaps not as good as Day 1 content-wise. In the end, I only went to two talks out of three, preferring to spend some time socialising with some of the speakers in the hotel lounge about different geeky topics.</p>
<p>The first talk I went to was <strong>"Feeling secure? - notes from the field"</strong> by Paul Lemon. As I'd already attended the security tutorial the day before, this was perhaps not so relevant for me. There also wasn't enough time to cover all the topics properly, so the speaker was forced to gloss over the slides rather than talk in detail.</p>
<p>To conclude the conference, I attended <strong>"Teaching (mostly) PHP"</strong> by Clinton Ingrams. Clinton brought his "in the field" experience about how to mentor and teach students programming, especially PHP programming in this case, presenting his teaching framework. During the presentation we debated the effectiveness of the framework and the taught concepts, as they don't necessarily reflect enterprise reality. The general idea and how he categorised the topics within his teaching module seemed reasonable, as generally keeping concepts simple and easy is important. However, I have to agree with the crowd, some of the examples seemed too simple particularly for final year university students who have already had some programming exposure.</p>
<h2>Conclusion</h2>
<p>The venue was great, ignoring the WiFi connectivity problems and the queue for the food. This was a very social event from day one, warm and funny with a horde of geeks trying to mix with "normal people" (yes, that can happen if you attend the PHPNW conference, so try not to miss it next year). The best thing about PHP conferences is knowledge-sharing; you won't leave without a hundred different thoughts and ideas of how to do things better. Once again - definitely a good time, both personally and professionally. If you weren't there, you missed out!</p>
<p><em>If you didn't make it to the conference, the PHPNW11 organisers will be releasing all the main talks from the conference as videos over the next months. Follow <a href="http://twitter.com/#!/phpnw11">@phpnw11</a> on Twitter to be the first to hear when the videos are up.</em></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F&amp;title=PHPNW11+Conference+Report+-+Part+II" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F&amp;title=PHPNW11+Conference+Report+-+Part+II" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F&amp;title=PHPNW11+Conference+Report+-+Part+II" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F&amp;headline=PHPNW11+Conference+Report+-+Part+II" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=PHPNW11+Conference+Report+-+Part+II&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PHPNW11+Conference+Report+-+Part+II&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=PHPNW11+Conference+Report+-+Part+II&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PHPNW11+Conference+Report+-+Part+II&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PHPNW11+Conference+Report+-+Part+II&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F&amp;title=PHPNW11+Conference+Report+-+Part+II&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F27%2Fphpnw11-report-part-ii%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/10/27/phpnw11-report-part-ii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHPNW11 Conference Report</title>
		<link>http://techportal.ibuildings.com/2011/10/20/phpnw11-conference-report/</link>
		<comments>http://techportal.ibuildings.com/2011/10/20/phpnw11-conference-report/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 08:29:21 +0000</pubDate>
		<dc:creator>Marco Lopes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[phpnw11]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3433</guid>
		<description><![CDATA[Earlier this month, 27 members of the Ibuildings team attended the PHPNW11 conference in Manchester. We will publish two personal reviews of the event by two of our software engineers - here's the first one. Security Tutorial Beware of the dark side, Luke! For the morning of the tutorial day at PHPNW11, I decided to [...]]]></description>
			<content:encoded><![CDATA[<p><em>Earlier this month, 27 members of the Ibuildings team attended the <a href="http://conference.phpnw.org.uk/phpnw11/">PHPNW11 conference</a> in Manchester. We will publish two personal reviews of the event by two of our software engineers - here's the first one.</em></p>
<h2>Security Tutorial</h2>
<p><b>Beware of the dark side, Luke!</b></p>
<p>For the morning of the tutorial day at PHPNW11, I decided to attend <strong>"Beware of the dark side, Luke!"</strong>, a security tutorial by Arne Blankerts. While web developers tend to give more emphasis to the security issues directly related with their application (such as XSS, CSRF, SQL injection or Session security), Arne's tutorial was very interesting because it focused also on direct machine access, remote OS access, installed software exploiting, and hardware exploits.</p>
<p><a href="http://www.flickr.com/photos/stuartherbert/6229549921/in/photostream"><img alt="" src="http://farm7.static.flickr.com/6033/6229549921_c1aaedc8be.jpg" title="Security Tutorial by Arne Blankerts (c) Stuart Herbert" class="alignright" width="500" height="332" /></a></p>
<p><span id="more-3433"></span><br />
Security is not an absolute concept, it consists of layers. How secure your data is from someone who's trying to obtain it depends on the effort someone is willing to put in versus the time/money you're willing to spend preventing that access.</p>
<p><b>Local Access</b></p>
<p>This bring us to the first topic of the tutorial, data centre security. Even if you went all the way to prevent remote attacks, can your hosting provider guarantee that someone won't just be able to enter their data centre, and flee with your disk full of client data?</p>
<p>And consider this - if your data is valuable enough to someone, and you have a backup system powered by your hosting company, what if that system is shared by other clients? Can an attacker get a machine and backup service on the same hosting company as you, and use this machine to try to get data from the backup server? </p>
<p>The point here is that there's always something that someone can do to get to your data. How far you need to go to prevent that depends on whether the data is worth that amount of effort. So, the first step towards security is to decide where to host your application. If you deal with very sensitive data that is of great value, you'll probably want to go with a secure data centre, encrypted disks, non-shared backup servers and all data, sent and received, should be encrypted. It's up to you to decide if you need all of this, none of this, or something in between.</p>
<p><strong>Remote Access</strong></p>
<p>The tutorial then proceeded to remote access security. The first step is to disable password-based SSH login and only allow key-based login. This prevents brute force attacks to get your password. Of course, external root access should also be disabled - if you need root access, just give Sudo capabilities to a standard user, or use su.</p>
<p>Under no circumstances should you use FTP. The FTP protocol is very insecure; not only does it send all your data in plain text over the network, but it also sends your login credentials in plain text. It also uses random port numbers for communication, making it easier for an attacker to take over an existing connection and receive/send information to your server.</p>
<p><strong>Apache and PHP</strong></p>
<p>After this, we started taking a look at security from the Apache and PHP perspective. We discussed why PHP's safe_mode is broken and in fact makes you more vulnerable to security issues than protecting you. For this reason, safe_mode should never be on, and is scheduled to be dropped out of PHP soon. On the other hand open_basedir should always be used.</p>
<p>All software exposing, such as Apache version, PHP version, or even if your server is using Apache and PHP, should be hidden from someone accessing your server. Always set  expose_php to off on your php.ini file.</p>
<p>If possible, use php-fpm instead of mod_php. It will give you not only security advantages, but also performance improvements. With mod_php every request will cause Apache to load PHP and all of its modules, even if those requests don't require PHP to prepare the response, as for example static pages, or static images. With php-fpm, a number of PHP processes are always running, ready to reply to Apache requests that happen to need PHP.</p>
<p><strong>Hardware</strong></p>
<p>From here, we moved into hardware issues. Custom hardware issues. Again, this is something that requires your data to have enough value to someone, that they will go all the way to get a piece of hardware into your system. One good example is a modified USB dongle that can be casually dropped on a desk and that eventually someone will plug into their computer, or be social engineered to do it. From this point on, a hacker can have access to that computer.</p>
<p><strong>Web Application Security</strong> </p>
<p>Next we moved into the security issues that PHP web developers are more familiar with - the exploits an attacker can run directly into your application.</p>
<p><strong>XSS</strong></p>
<p>We started by taking a look at Cross Site Scripting attacks. XSS lets an attacker inject content into a page, allowing them to add JavaScript or HTML to the page. We looked into the three different XSS kinds of attacks, which are the DOM based, the non-persistent and the persistent.</p>
<p>Some rules of thumb to avoid being vulnerable to XSS attacks, include making sure to filter input for the right context, always escape output contextually, always prefer whitelisting to blacklisting, and never try to read user intentions and repair their input, which sometimes can make an attack even worse.</p>
<p><strong>Sessions</strong></p>
<p>After XSS, we dived into sessions, and possible attacks through sessions. First we looked into some problems with sessions, such as coming from an untrustworthy source, being outdated or belonging to a user other than the one we’re expecting. We also noted that PHP doesn’t validate session id, which means a session id can contain malicious characters or not point to an actual session.</p>
<p>We then looked into session fixation, where a session id may be provided via a link using PHPSESSID, via XSS by setting a cookie or via plugins like Flash which breaks JavaScript security. Ways to prevent session fixation include validating the session id manually (i.e. writing custom code for it), always changing session id with each status change, such as login, change of permissions, or restart of session. Never use the URL to pass a session id, always use cookies and if possible send the HttpOnly header to the browser.</p>
<p><strong>Session Data</strong></p>
<p>We then proceeded to discuss why session data should never be trusted. Unless specifically overridden, PHP stores all session data on the same path. This means that if your application is running in a shared hosting environment, an attacker sharing hosts with you can read and write to your session data, and this can even lead to code execution.</p>
<p><strong>Session Hijacking</strong></p>
<p>The most effective protection against session hijacking is probably fully switching to HTTPS. In case this is not possible, always use different session ids for HTTP and HTTPS.</p>
<p><strong>CSRF</strong></p>
<p>Typical protection against CSRF includes using tokens. But for the tokens to be safe, you must not use predictable seeds for your token. An md5 of time(), for example, is easy to fake. Assuming that there's a session when comparing the token with the one supposedly stored on the session, can allow for a CSRF attack, if you fail to check whether the session really contains a token.</p>
<p><strong>Session Puzzling</strong></p>
<p>This can happen if your application uses the same name for session variables in different contexts.</p>
<p><strong>Captcha</strong></p>
<p>Captchas are hard to read, and can be easily crowdsourced. They're also vulnerable to the same implementation failure mentioned regarding CSRF. If the code validates the provided value against a value that is supposed to be in the session without checking for its contents, an empty attempt to get into the page, without an active session, can pass the captcha validation.</p>
<p><strong>Database</strong></p>
<p>In addition to using prepared statements, always make sure field names, table names and sorting fields don’t come from user input, use associative arrays as whitelists for those situations. Always make sure the user can’t send values other than int when setting limits on the number of results.</p>
<p>Use PDO instead of the MySQL extension.</p>
<p><strong>Passwords</strong></p>
<p>Never store plain text passwords. Use salt when encrypting a password and reapply hashing multiple times. Do a quality check on user-supplied passwords. If possible, advise your users not to use common words or common words with characters replaced by numbers (for example replacing and O by 0 or an A by 4 and so on).</p>
<p><strong>Clickjacking</strong></p>
<p>And finally we took a look at clickjacking and ways to avoid it, such as setting X-FRAME-OPTIONS to deny for no iframe embedding, or setting it to SAMEORIGIN to allow only frames from the same host.</p>
<p><a href="http://www.flickr.com/photos/stuartherbert/6231781557/in/photostream"><img alt="" src="http://farm7.static.flickr.com/6049/6231781557_5410a4bb57.jpg" title="PHPNW11 Audience (c) Stuart Herbert" class="alignright" width="500" height="283" /></a></p>
<h2>Web Services Tutorial</h2>
<p>After lunch, I went to the Web Services tutorial, presented by Lorna Mitchell, one of the organisers of PHPNW11. </p>
<p>We started by defining what a web service is: a way for an application to communicate, allowing for integration with other applications, exposing data and/or functionality, letting you refactor your application without the need to change the way others communicate with it. This allows you to have a common API from where different front ends or even 3rd party applications can get data or functionality.</p>
<p>We then discussed JSON vs XML, and why it is preferable to provide both kinds of output if possible. After that, we defined ‘Heartbeat Method’, and what it is used for. It was established that without documentation, examples, and a help point, a Web Service isn’t helpful at all, as people won’t be able to use it. </p>
<p>We then got into HTTP status codes, HTTP verbs and how to use them correctly and in a RESTful way. Still on the subject of HTTP protocol, Lorna spoke of the correct use of HTTP headers and how web services should be stateless, and all information needed should be on the request. Then we looked into some types of web services such as RESTful, RPC (XML-RPC, JSON-RPC or Soap). We looked in more detail into REST resources and collections. On how hypermedia allows a service to be self-documented, and allows URLs to change because they are provided by the API itself.</p>
<p>After a session of questions and answers, the tutorial day was over and everyone headed over to the pre-conference social at Kro Piccadilly to meet other developers and tech people all around.</p>
<h2>Day 1</h2>
<p>The first conference day started with an outstanding keynote by Ian Barber, <strong>"How to Stand on the Shoulders of Giants"</strong>. Ian spoke about how great ideas often come from the wish to solve a personal problem and not from the intention of creating something revolutionary. He also spoke about how innovation often builds upon the work of others, and how any of us can one day build something great, if we just keep trying to build the tools that will help us get where we want.</p>
<p><a href="http://www.flickr.com/photos/stuartherbert/6231772651/in/photostream"><img alt="" src="http://farm7.static.flickr.com/6152/6231772651_00d5569817.jpg" title="Ian Barber&#039;s Keynote at PHPNW11 (c) Stuart Herbert" class="alignright" width="500" height="332" /></a></p>
<p>After the keynote, I decided to go to Sebastian Marek’s talk <strong>"Magic Behind the Numbers - Software Metrics in Practice"</strong>. Sebastian spoke about metrics to evaluate the complexity of a software project. He presented ways to look for the complexity and try to reduce it. He spoke of sonar, php_depend, php_cpd, phploc, PHPMD and a lot of other tools that can help one get to the bottom of where complexity lies within their application. I then attended Sebastian Bergmann's talk on <strong>"PHP Tester’s Toolbox"</strong>. Sebastian, the author of PHPUnit, covered various testing tools for PHP, reviewing their pros and cons and comparing them to PHPUnit.</p>
<p>After lunch, I went to see my colleague Alistair Stead's talk on <strong>"Varnish your PHP Application, Make it Fly!"</strong> in Track 2. Alistair went through Varnish’s configurations details, how the options one takes during the configuration relate to the type of website on which Varnish is being applied. He showed some actual stats on how Varnish can speed up a Magento ecommerce website, and gave some details on how to use both together.</p>
<p>After Alistair's talk, I headed to Track 1 to watch another Ibuildings colleague - Rowan Merewood’s talk on <strong>"Estimation or 'How To Dig Your Own Grave'"</strong>, which ended up being one of the best of PHPNW11. Rowan’s computer was having issues connecting to the projector, and to make things worse, the previous talk in Track 1 went on longer than expected, leaving Rowan even less time to set things up. After a while the audience started being amused by all these attempts to make the laptop work with the projector, but the solution ended up being the switch of Rowan's laptop for Ben Longden’s MacBook Pro. For some more amusement of the audience, Ben's laptop seemed to be unable to show the slides in fullscreen and the remote control to change the slides wasn't working either. At this point, Rowan recruited Ian Barber to manually change the slides through the talk, and it was time to start. His presentation was flawless, a great choice of images, every detail was taken care of, to the point that his clothes matched the slide theme. The talk focused on how to make project estimates, and how to avoid some common pitfalls that often ruin estimates. During the talk, some Twitter users were rating it as one of the best of the conference, which I will have to agree with.</p>
<p><a href="http://www.flickr.com/photos/stuartherbert/6231661107/in/photostream"><img alt="" src="http://farm7.static.flickr.com/6117/6231661107_c53885aa6f.jpg" title="Technical Problems in Rowan Merewood&#039;s Talk (c) Stuart Herbert" class="alignright" width="500" height="332" /></a></p>
<p>In the evening, there was an open tab at the hotel bar, where the more than 350 participants met for some drinks and some more PHP-related talks. Later, a few of us decided to take a walk around Manchester and get to know the city and some of its iconic locations such as the legendary Factory.</p>
<p><em>All photographs in this post copyright (c) <a href="http://www.flickr.com/photos/stuartherbert/">Stuart Herbert</a></em></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F&amp;title=PHPNW11+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F&amp;title=PHPNW11+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F&amp;title=PHPNW11+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F&amp;headline=PHPNW11+Conference+Report" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=PHPNW11+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PHPNW11+Conference+Report&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=PHPNW11+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PHPNW11+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PHPNW11+Conference+Report&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F&amp;title=PHPNW11+Conference+Report&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F20%2Fphpnw11-conference-report%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/10/20/phpnw11-conference-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DPC Radio: Searching with Solr - Why, When, and How</title>
		<link>http://techportal.ibuildings.com/2011/10/05/dpc-radio-searching-with-solr-why-when-and-how/</link>
		<comments>http://techportal.ibuildings.com/2011/10/05/dpc-radio-searching-with-solr-why-when-and-how/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 09:05:32 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[dpc11]]></category>
		<category><![CDATA[Paul Matthews]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[Solr]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3405</guid>
		<description><![CDATA[Paul Matthews With Google constantly pushing the customer expectations of searching, is it time to move away from our database full-text search in pursuit of a more targeted platform? Can implementing Solr offer more than an answer to a search? Implementing a search platform isn’t always suitable for all applications, but in this talk we’ll [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Paul Matthews</strong></p>
<p>With Google constantly pushing the customer expectations of searching, is it time to move away from our database full-text search in pursuit of a more targeted platform? Can implementing Solr offer more than an answer to a search? Implementing a search platform isn’t always suitable for all applications, but in this talk we’ll look at identifying the right search solution, choosing the best way to integrate it into our application and exploring all the benefits a search server can offer.</p>
<p><b>Edit: </b>Paul's slides can be found at <a href="http://www.slideshare.net/paulmatthews86/search-with-solr">http://www.slideshare.net/paulmatthews86/search-with-solr</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F&amp;title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F&amp;title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F&amp;title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F&amp;headline=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F&amp;title=DPC+Radio%3A+Searching+with+Solr+-+Why%2C+When%2C+and+How&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F10%2F05%2Fdpc-radio-searching-with-solr-why-when-and-how%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/10/05/dpc-radio-searching-with-solr-why-when-and-how/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_016.mp3" length="44365913" type="audio/mpeg" />
		</item>
		<item>
		<title>DPC Radio: Let's take over the world with Zend Framework</title>
		<link>http://techportal.ibuildings.com/2011/09/21/dpc-radio-lets-take-over-the-world-with-zend-framework/</link>
		<comments>http://techportal.ibuildings.com/2011/09/21/dpc-radio-lets-take-over-the-world-with-zend-framework/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 08:02:23 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[Martin de Keijzer]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3396</guid>
		<description><![CDATA[Today's episode comes from one of our own Ibuildings employees, covering Zend Framework. Martin de Keijzer Many people use Zend Framework for it's MVC implementation, but it has a lot of hidden gems. Internationalization (i18n) is one of them. We will look how you can create an application that will have the right languages, currencies, [...]]]></description>
			<content:encoded><![CDATA[<p>Today's episode comes from one of our own Ibuildings employees, covering Zend Framework.</p>
<p><strong>Martin de Keijzer</strong></p>
<p>Many people use Zend Framework for it's MVC implementation, but it has a lot of hidden gems. Internationalization (i18n) is one of them. We will look how you can create an application that will have the right languages, currencies, dates and times all based on the location of the visiting user. This session will take away a lot of headaches in international projects and will improve the quality in overall.</p>
<p><b>Edit: </b> You can find Martin's slides <a href="http://www.slideshare.net/Martin82/lets-take-over-the-world-with-zend-framework-8063834">on slideshare</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F&amp;title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F&amp;title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F&amp;title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F&amp;headline=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F&amp;title=DPC+Radio%3A+Let%27s+take+over+the+world+with+Zend+Framework&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F21%2Fdpc-radio-lets-take-over-the-world-with-zend-framework%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/09/21/dpc-radio-lets-take-over-the-world-with-zend-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_012.mp3" length="82240989" type="audio/mpeg" />
		</item>
		<item>
		<title>DPC Radio: Keynote - First Class APIs</title>
		<link>http://techportal.ibuildings.com/2011/09/13/dpc-radio-keynote-first-class-apis/</link>
		<comments>http://techportal.ibuildings.com/2011/09/13/dpc-radio-keynote-first-class-apis/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 06:43:05 +0000</pubDate>
		<dc:creator>dpcradio</dc:creator>
				<category><![CDATA[DPCRadio]]></category>
		<category><![CDATA[apis]]></category>
		<category><![CDATA[dpc11]]></category>
		<category><![CDATA[Helgi Þormar Þorbjörnsson]]></category>
		<category><![CDATA[keynote]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3387</guid>
		<description><![CDATA[This year's DPCRadio returns with one of the keynotes from this year's event as our first episode. Helgi Þormar Þorbjörnsson APIs are commonly an afterthought, like a hot tub awkwardly attached to a house — a shoehorned approach that produces a suboptimal app with scarce support that lacks documentation. In effect, APIs are the ugly stepchild of [...]]]></description>
			<content:encoded><![CDATA[<p>This year's DPCRadio returns with one of the keynotes from this year's event as our first episode.</p>
<p><strong>Helgi Þormar Þorbjörnsson</strong></p>
<p>APIs are commonly an afterthought, like a hot tub awkwardly attached to a house — a shoehorned approach that produces a suboptimal app with scarce support that lacks documentation. In effect, APIs are the ugly stepchild of the Web.</p>
<p>This is a sad reality that we are faced with, because many companies make their living consuming third-party APIs and mixing in their own data to create amazing and interesting mashups. In the initial phases of development, there is rarely enough money to develop the app and its API. By the time there’s both demand and money, it can be hard to fit an API on top of the architecture in such a way that the whole thing won’t fall over. APIs should be first class citizens of the Web. Inconceivable? Possimpible? Not at all!</p>
<p>In this talk we will dive deeper into why APIs are an afterthought, how we can change that. We will also touch on how that can benefit your product down the line in terms of resource savings and infrastructure efficiency, as well as the impact it will have on your infrastructure.</p>
<p>This talk is inspired by my <a href="http://phpadvent.org/201002">phpadvent</a> article. </p>
<p>(You can find Helgi's slides <a href="http://www.slideshare.net/helgith/firstclass-apis-dpc-2011-amsterdam">over on Slideshare</a>)</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F&amp;title=DPC+Radio%3A+Keynote+-+First+Class+APIs" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F&amp;title=DPC+Radio%3A+Keynote+-+First+Class+APIs" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F&amp;title=DPC+Radio%3A+Keynote+-+First+Class+APIs" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F&amp;headline=DPC+Radio%3A+Keynote+-+First+Class+APIs" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=DPC+Radio%3A+Keynote+-+First+Class+APIs&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DPC+Radio%3A+Keynote+-+First+Class+APIs&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=DPC+Radio%3A+Keynote+-+First+Class+APIs&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DPC+Radio%3A+Keynote+-+First+Class+APIs&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DPC+Radio%3A+Keynote+-+First+Class+APIs&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F&amp;title=DPC+Radio%3A+Keynote+-+First+Class+APIs&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F09%2F13%2Fdpc-radio-keynote-first-class-apis%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/09/13/dpc-radio-keynote-first-class-apis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://dpcradio.s3.amazonaws.com/2011_007.mp3" length="102960022" type="audio/mpeg" />
		</item>
		<item>
		<title>Beyond TDD with PHPSpec</title>
		<link>http://techportal.ibuildings.com/2011/08/03/outside-in-behaviour-driven-development-in-php-part-2/</link>
		<comments>http://techportal.ibuildings.com/2011/08/03/outside-in-behaviour-driven-development-in-php-part-2/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 09:26:59 +0000</pubDate>
		<dc:creator>Marcello Duarte</dc:creator>
				<category><![CDATA[Planet PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[behat]]></category>
		<category><![CDATA[behaviour driven development]]></category>
		<category><![CDATA[marcello]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[phpspec]]></category>
		<category><![CDATA[quality assurance]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://techportal.ibuildings.com/?p=3308</guid>
		<description><![CDATA[This is the second part of a series about Outside-in Behaviour Driven Development in PHP. The first part introduces outside-in development, and how to execute scenarios with Behat. Read this to catch up with the tools and the example we've used so far, then come back to find out how PHPSpec fits into this picture. [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second part of a series about Outside-in Behaviour Driven Development in PHP. The <a href="http://techportal.ibuildings.com/2011/07/21/outside-in-behaviour-driven-development-in-php" title="Part 1">first part</a> introduces outside-in development, and how to execute scenarios with Behat.  Read this to catch up with the tools and the example we've used so far, then come back to find out how PHPSpec fits into this picture.<br />
<span id="more-3308"></span></p>
<p><a href="http://www.phpspec.net" title="PHPSpec">PHPSpec</a> is the first ever PHP BDD framework. It is a port of <a href="http://rspec.info/">RSpec</a> to PHP created back in 2007 by Pádraic Brady and Travis Swicegood. Development in this framework stopped for a while and was reignited last August (2010). PHPSpec can be installed via pear, using these commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pear config-set preferred_state beta
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pear channel-discover pear.phpspec.net
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">--all-deps</span> phpspec<span style="color: #000000; font-weight: bold;">/</span>PHPSpec</pre></div></div>

<p>
If you are accustomed to unit testing, here is a quick translation sheet for xUnit/xSpec terms:</p>
<ul>
<li>In xUnit we <strong>test</strong>; in xSpec we <strong>describe</strong>, so your class names begin with "Describe"</li>
<li>In PHPSpec, the spec file for a class MyClass is named <strong>MyClassSpec.php</strong></li>
<li>In xUnit we group tests in a <strong>TestCase</strong>. In xSpec we have examples that are grouped into <strong>Contexts</strong></li>
<li>In xUnit each method is a test with the prefix <strong>test</strong>. In xSpec each method is an <strong>example</strong>, we use the prefix <strong>it</strong></li>
<li>In xUnit we <strong>assert</strong> that something work as expected. In xSpec we specify how it <strong>should</strong> work</li>
</ul>
<p></p>
<p>We've used Gherkin and Behat to specify how our application is supposed to work. We use PHPSpec to specify the behaviour of our classes. To get you started, let's see a simple example showing this. We are building a class that greets the user with "Hello, World!". The <code>GreeterSpec.php</code> file would 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> DescribeGreeter <span style="color: #000000; font-weight: bold;">extends</span> \PHPSpec\Context
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> before<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">greeter</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">spec</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Greeter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">function</span> itGreetsUsingAHelloWorldMessage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$message</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">greeter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">greet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$message</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">should</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">be</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hello, World!'</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></p>
<p>If you already have experience with Unit Testing, the above would look familiar to you. Note that instead of saying: <code>$this->assertEquals('Hello, World!', $message)</code> we say <code>$message->should->be('Hello, World!')</code>. We are describing how we want the behaviour to be, rather than testing it. The <code>before()</code> method is a setup method that would get run before any example is run; the <code>spec()</code> method is a decorator that wraps the object being tested so we call the expectations on the properties and methods results.</p>
<p>To run the spec we use the phpspec command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpspec GreeterSpec.php</pre></div></div>

<p>First we run it and watch it fail. Then we write a Greeter class to satisfy the example.</p>
<h3>PHPSpec and MVC</h3>
<p>Going back to our Video Renting application. The newly released version (1.2beta) includes integration with Zend Framework which enables us to test the MVC (Model, View, Controller) components individually. When we test an MVC application, we should start with the view, because that's what our scenario describes: </p>
<blockquote><p>The text "Revolution OS" was not found anywhere in the text of the current page</p></blockquote>
<p>Let's keep all our specs in a folder called "spec". To write a view spec we first add a folder called <em>views</em> under the spec folder.  In our example, this is a view that corresponds to the <em>index </em>action of the <em>review</em> controller. We need to create an <code>IndexSpec.php</code> for our <code>index.phtml</code> view, containing the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">namespace</span> Review<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// SpecHelper contains the usual ZF bootstrap</span>
<span style="color: #666666; font-style: italic;">// copied from public/index.php</span>
<span style="color: #b1b100;">require_once</span> __DIR__ <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/../../SpecHelper.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> \PHPSpec\Context\Zend\View <span style="color: #b1b100;">as</span> ViewContext<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> DescribeIndex <span style="color: #000000; font-weight: bold;">extends</span> ViewContext
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> itRendersTheSelectedVideo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$video</span> <span style="color: #339933;">=</span> \Mockery<span style="color: #339933;">::</span><span style="color: #004000;">mock</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'Application_Model_Video'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'getName'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Revolution OS'</span><span style="color: #009900;">&#41;</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;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'video'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$video</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;">render</span><span style="color: #009900;">&#40;</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;">rendered</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">should</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">contain</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Revolution OS'</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></p>
<p>Notice that we namespaced our class with the name of the controller. In a modular Zend Framework application you would namespace with the module name and then controller name, e.g. <code>Module\Controller</code>.</p>
<p>If we run the spec we should see an error because we haven't met its description yet.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpspec spec
E
&nbsp;
Exceptions:
&nbsp;
  <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Review\Index renders the selected video
     Failure\Exception: <span style="color: #007800;">$this</span>-<span style="color: #000000; font-weight: bold;">&gt;</span>runExamples<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$exampleGroup</span>, <span style="color: #007800;">$reporter</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
     Zend_View_Exception: script <span style="color: #ff0000;">'review/index.phtml'</span> not found <span style="color: #000000; font-weight: bold;">in</span> path <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>renting<span style="color: #000000; font-weight: bold;">/</span>application<span style="color: #000000; font-weight: bold;">/</span>views<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Finished <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.004656</span> seconds
<span style="color: #000000;">1</span> example, <span style="color: #000000;">1</span> exception</pre></div></div>

<p></p>
<p>At this stage we need to create the view to deal with the error we saw. In this example, we will use Zend Tool, which creates the controller/action/view all in one go:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ zf create controller Review
Creating a controller at <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>renting<span style="color: #000000; font-weight: bold;">/</span>application<span style="color: #000000; font-weight: bold;">/</span>controllers<span style="color: #000000; font-weight: bold;">/</span>ReviewController.php
Creating an index action method <span style="color: #000000; font-weight: bold;">in</span> controller Review
Creating a view script <span style="color: #000000; font-weight: bold;">for</span> the index action method at 
<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>renting<span style="color: #000000; font-weight: bold;">/</span>application<span style="color: #000000; font-weight: bold;">/</span>views<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>review<span style="color: #000000; font-weight: bold;">/</span>index.phtml
Updating project profile <span style="color: #ff0000;">'/private/var/www/renting/.zfproject.xml'</span></pre></div></div>

<p>
Now instead of an error, our output shows that we have a failure:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpspec spec
F
&nbsp;
Failures:
&nbsp;
  <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Review\Index renders the selected video
     Failure\Error: <span style="color: #007800;">$this</span>-<span style="color: #000000; font-weight: bold;">&gt;</span>rendered-<span style="color: #000000; font-weight: bold;">&gt;</span>should-<span style="color: #000000; font-weight: bold;">&gt;</span>contain<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'Revolution OS'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
     expected to contain <span style="color: #ff0000;">'Revolution OS'</span>, found no match <span style="color: #7a0874; font-weight: bold;">&#40;</span>using contain<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
     <span style="color: #666666; font-style: italic;"># ./spec/views/review/IndexSpec.php:17</span>
&nbsp;
Finished <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.005078</span> seconds
<span style="color: #000000;">1</span> example, <span style="color: #000000;">1</span> failure</pre></div></div>

<p></p>
<p>This output means that the view now exists, but it's not showing the described text. That's what we expect, since we haven't coded the view yet. Let's add some code to do so:</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: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">video</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>It should now pass.<br />
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpspec spec
.
&nbsp;
Finished <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.001043</span> seconds
<span style="color: #000000;">1</span> example</pre></div></div>

<p>
That's progress! However Behat is still not happy, because our controller is not setting the model for the view yet. Let us turn our focus to the controller, and start by creating a <code>controllers </code>directory and adding a <code>ReviewControllerSpec.php</code>. </p>
<p><code>DescribeReviewController</code> must extend <code>\PHPSpec\Context\Zend\Controller</code>. We also need to specify that our controller will send be accessed by POST and will create the model in it. The controller/action will be routed from "/review" and we can add an example to make sure the route work as expected.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #b1b100;">require_once</span> __DIR__ <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/../SpecHelper.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> DescribeReviewController <span style="color: #000000; font-weight: bold;">extends</span> \PHPSpec\Context\Zend\Controller
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> itShouldRouteTheReviewsPageToTheIndexAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">routeFor</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'review'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'index'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
             <span style="color: #339933;">-&gt;</span><span style="color: #004000;">should</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">be</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/review'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">function</span> itShouldDispatchToTheReviewController<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$container</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> \Yadif_Container<span style="color: #009900;">&#40;</span>
            <span style="color: #000000; font-weight: bold;">new</span> \Zend_Config_Xml<span style="color: #009900;">&#40;</span>APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/configs/objects.xml&quot;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$mapper</span> <span style="color: #339933;">=</span> \Mockery<span style="color: #339933;">::</span><span style="color: #004000;">mock</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Application_Model_VideoMapper'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$mapper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">shouldReceive</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'find'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">andReturn</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$container</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">videoModel</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">with</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">once</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$container</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">videoMapper</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$mapper</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_getZendTest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bootstrap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBootstrap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setContainer</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$container</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/review'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'1'</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></p>
<p>We'll also want to add the code for the controller itself. Assuming you are using <a href="https://github.com/beberlei/yadif" title="Yadif">Yadif</a> or another IoC (Inversion of Control) container, it would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ReviewController <span style="color: #000000; font-weight: bold;">extends</span> Zend_Controller_Action
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> indexAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">video</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMapper</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_request<span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">function</span> getMapper<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$container</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getInvokeArg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'bootstrap'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContainer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$container</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getComponent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'videoMapper'</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>We'll see that this now passes, when we run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpspec spec
...
&nbsp;
Finished <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">0.005271</span> seconds
<span style="color: #000000;">3</span> examples</pre></div></div>

<p>This looks much healthier, but if we run Behat, it will still be unhappy. We need to pass real data to the view, and then Behat will point out that the next step now is to describe the model. We need to have the data of our selected movies so we can fetch our view properly. Testing the models should be focused on behaviour, rather than the mechanics of database access. We know Zend_Db works, we need to know if we have made mistakes in our model. We will therefore test for the validation, filtering and business rules that we keep in the model.</p>

<div class="wp_syntax"><div class="code"><pre class="pre" style="font-family:monospace;">class DescribeVideo extends \PHPSpec\Context
{
    function before()
    {
        $this-&gt;video = $this-&gt;spec(new Application_Model_Video);
    }
&nbsp;
    function itIsNotValidWithoutTheName()
    {
        $this-&gt;video-&gt;setName('');
        $this-&gt;video-&gt;shouldNot-&gt;beValid();
    }
}</pre></div></div>

<p></p>
<p>We need to implement a <code>isValid()</code> method in the <code>Video </code>model. PHPSpec does not have a <code>beValid</code> matcher, but it will use predicate matchers and find a method <code>isValid()</code> by magic. Once the <code>isValid()</code> is implemented properly than the spec passes. You can do something similar if the form validation is stored in your (zend) forms. Also note the <code>before()</code> method that will be called before any example is run.</p>
<p>You can describe your mapper's behaviour by inspecting that it calls the Data Access Object (DAO) to fetch to or persist data from the models. At that point you can then add the DAO (e.g. DbTable, Rss, etc).</p>
<h3>Should we Hit the Database?</h3>
<p>In many cases you simply need to verify the business logic and not the database operation. Hitting the database consumes both time and resources, which will slow down the execution. There will be times where we need to expose some database behaviour or just feel more confident that our models work. In those cases we can use a <a href="http://www.c2.com/cgi/wiki?TestDataBuilder" title="Test Data Builder">Test Data Builder</a> pattern (this is a topic on its own, and I will save it for another post).</p>
<p>If you run Behat again after the model specs pass, the view should be displaying the correct data, so your scenario should pass, and a new scenario will be failing. We use Behat to tell us what to do next, and so the outside-in cycle is begins again.</p>
<h3>Final Thoughts</h3>
<p>In BDD, developers are driven by the specification, rather than tests of things they haven’t written yet. That said, the goals of both TDD and BDD are basically the same: making sure the user gets what they want. BDD makes that focus more explicit, and uses a language that invites the user to write their tests as a specification.</p>
<p>Behat and PHPSpec sit at different levels in the Outside-in cycle. Behat provides the outermost layer, allowing the stakeholders and developers to collaborate. PHPSpec provides the inner layer, allowing the specification of how the classes will collaborate with each other.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F&amp;title=Beyond+TDD+with+PHPSpec" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F&amp;title=Beyond+TDD+with+PHPSpec" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F&amp;title=Beyond+TDD+with+PHPSpec" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F&amp;headline=Beyond+TDD+with+PHPSpec" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Beyond+TDD+with+PHPSpec&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Beyond+TDD+with+PHPSpec&amp;u=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Beyond+TDD+with+PHPSpec&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Beyond+TDD+with+PHPSpec&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Beyond+TDD+with+PHPSpec&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F&amp;title=Beyond+TDD+with+PHPSpec&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Ftechportal.ibuildings.com%2F2011%2F08%2F03%2Foutside-in-behaviour-driven-development-in-php-part-2%2F" ><img class="lightsocial_img" src="http://techportal.ibuildings.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://techportal.ibuildings.com/2011/08/03/outside-in-behaviour-driven-development-in-php-part-2/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

