<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Awesomism</title>
	<atom:link href="http://awesomism.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://awesomism.co.uk</link>
	<description>Think... Believe... Create... Release!</description>
	<lastBuildDate>Mon, 28 Nov 2011 16:53:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Can&#8217;t connect to MySQL on localhost using PHP on CentOS</title>
		<link>http://awesomism.co.uk/2011/11/28/cant-connect-to-mysql-on-localhost-using-php-on-centos/</link>
		<comments>http://awesomism.co.uk/2011/11/28/cant-connect-to-mysql-on-localhost-using-php-on-centos/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 16:53:35 +0000</pubDate>
		<dc:creator>Harry Walter</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Facts, Hints and Tips]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/?p=182</guid>
		<description><![CDATA[This is an issue i&#8217;ve seen a couple of times over the past month: Can&#8217;t connect to MySQL server on &#8217;127.0.0.1&#8242; (13) So you&#8217;ve checked your server, MySQL is running and you&#8217;ve checked your credentials, they&#8217;re all valid yet you still can&#8217;t connect to your database. Don&#8217;t Panic! There is actually a very simple explanation [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is an issue i&#8217;ve seen a couple of times over the past month:</p>
<blockquote><p>Can&#8217;t connect to MySQL server on &#8217;127.0.0.1&#8242; (13)</p></blockquote>
<p>So you&#8217;ve checked your server, MySQL is running and you&#8217;ve checked your credentials, they&#8217;re all valid yet you still can&#8217;t connect to your database.</p>
<blockquote><p>Don&#8217;t Panic!</p></blockquote>
<p>There is actually a very simple explanation and &#8220;SELinux&#8221;. For some reason, which i won&#8217;t want to go into, this blocks your PHP script from connecting to the MySQL server. But how do you stop this behaviour?</p>
<p>Simples! Login to your server and at the prompt do this:</p>
<ol>
<li><span style="font-family: monospace;">Edit /etc/sysconfig/selinux and set SELINUX=permissive</span></li>
<li><span style="font-family: monospace;">(You will need to be root for this step):<br />
<code>echo 0 &gt;/selinux/enforce</code></span></li>
</ol>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d182').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d182" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;submitHeadline=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;title=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;title=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;title=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;bm_description=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;T=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;title=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;title=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F11%2F28%2Fcant-connect-to-mysql-on-localhost-using-php-on-centos%2F&amp;t=Can%26%238217%3Bt+connect+to+MySQL+on+localhost+using+PHP+on+CentOS" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d182').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d182').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/11/28/cant-connect-to-mysql-on-localhost-using-php-on-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Is Cloud Computing Like an Airplane?</title>
		<link>http://awesomism.co.uk/2011/05/12/how-is-cloud-computing-like-an-airplane/</link>
		<comments>http://awesomism.co.uk/2011/05/12/how-is-cloud-computing-like-an-airplane/#comments</comments>
		<pubDate>Thu, 12 May 2011 16:06:46 +0000</pubDate>
		<dc:creator>thescoop</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/2011/05/12/how-is-cloud-computing-like-an-airplane/</guid>
		<description><![CDATA[Via Scoop.it &#8211; VirtualizationAmazon&#8217;s Elastic Compute Cloud (EC2) service allows multiple instances of customer applications to run in so-called Availability Zones within a region; but analysts say it doesn&#8217;t provide the necessary tools to load-balance applications &#8230;Show original Bookmark It Hide Sites $$('div.d178').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) });]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Via <a href='http://www.scoop.it/t/virtualization/p/123869539/how-is-cloud-computing-like-an-airplane'>Scoop.it</a> &#8211; <a href='http://www.scoop.it/t/virtualization'>Virtualization</a><br /><img src='http://img.scoop.it/ISils-gkAt2SDLH0BhKcdTl72eJkfbmt4t8yenImKBXEejxNn4ZJNZ2ss5Ku7Cxt' /><br />Amazon&#8217;s Elastic Compute Cloud (EC2) service allows multiple instances of customer applications to run in so-called Availability Zones within a region; but analysts say it doesn&#8217;t provide the necessary tools to load-balance applications &#8230;<br /><a href='http://rethinkingitinfrastructure.com/how-is-cloud-computing-like-an-airplane'>Show original</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d178').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d178" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;submitHeadline=How+Is+Cloud+Computing+Like+an+Airplane%3F&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;title=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;title=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;title=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;bm_description=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;T=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;title=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;title=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+How+Is+Cloud+Computing+Like+an+Airplane%3F+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fhow-is-cloud-computing-like-an-airplane%2F&amp;t=How+Is+Cloud+Computing+Like+an+Airplane%3F" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d178').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d178').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/05/12/how-is-cloud-computing-like-an-airplane/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook pulls plugs on Mark Zuckerberg’s Facebook profile</title>
		<link>http://awesomism.co.uk/2011/05/12/facebook-pulls-plugs-on-mark-zuckerberg%e2%80%99s-facebook-profile/</link>
		<comments>http://awesomism.co.uk/2011/05/12/facebook-pulls-plugs-on-mark-zuckerberg%e2%80%99s-facebook-profile/#comments</comments>
		<pubDate>Thu, 12 May 2011 16:06:21 +0000</pubDate>
		<dc:creator>thescoop</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/2011/05/12/facebook-pulls-plugs-on-mark-zuckerberg%e2%80%99s-facebook-profile/</guid>
		<description><![CDATA[Via Scoop.it &#8211; VirtualizationNot the Mark Zuckerberg, just a Mark Zuckerberg Oh the pain: a consumer bankruptcy and home foreclosure attorney in Indianapolis is adjusting to life without Facebook, after an identity clash led to his account being disabled.…&#8230;Show original Bookmark It Hide Sites $$('div.d177').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) });]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Via <a href='http://www.scoop.it/t/virtualization/p/123251224/facebook-pulls-plugs-on-mark-zuckerberg-s-facebook-profile'>Scoop.it</a> &#8211; <a href='http://www.scoop.it/t/virtualization'>Virtualization</a><br /><img src='http://img.scoop.it/ffR1LbArS3oKuxHPwRV9RDl72eJkfbmt4t8yenImKBXEejxNn4ZJNZ2ss5Ku7Cxt' /><br />Not the Mark Zuckerberg, just a Mark Zuckerberg Oh the pain: a consumer bankruptcy and home foreclosure attorney in Indianapolis is adjusting to life without Facebook, after an identity clash led to his account being disabled.…&#8230;<br /><a href='http://www.theregister.co.uk/2011/05/12/zuckerberg_profile_disabled/'>Show original</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d177').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d177" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;submitHeadline=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;title=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;title=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;title=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;bm_description=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;T=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;title=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;title=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Ffacebook-pulls-plugs-on-mark-zuckerberg%25e2%2580%2599s-facebook-profile%2F&amp;t=Facebook+pulls+plugs+on+Mark+Zuckerberg%E2%80%99s+Facebook+profile" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d177').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d177').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/05/12/facebook-pulls-plugs-on-mark-zuckerberg%e2%80%99s-facebook-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doctrine, Event Listeners and persisted IDs</title>
		<link>http://awesomism.co.uk/2011/05/12/doctrine-event-listeners-and-persisted-ids/</link>
		<comments>http://awesomism.co.uk/2011/05/12/doctrine-event-listeners-and-persisted-ids/#comments</comments>
		<pubDate>Thu, 12 May 2011 15:59:05 +0000</pubDate>
		<dc:creator>Harry Walter</dc:creator>
				<category><![CDATA[Design & Development]]></category>
		<category><![CDATA[Facts, Hints and Tips]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[symfony2]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/?p=175</guid>
		<description><![CDATA[Recently I was writing a small event listener to handle updating search indexes for object freshly persisted to the database. I am using MySQL as my backend, and because of this IDs are generated after the object has been inserted, not before. I spent ages trying to get the id of the object so I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I was writing a small event listener to handle updating search indexes for object freshly persisted to the database. I am using MySQL as my backend, and because of this IDs are generated after the object has been inserted, not before.</p>
<p>I spent ages trying to get the id of the object so I could add this to the search index. Turns out the easiest way to do this is to listen for a Lifecycle event called PostPersist. This event is called after flushing the objects and after the object have been added to the database so the entities have their ids.</p>
<pre class="php">public function postPersist(LifecycleEventArgs $args)
{
    $entity = $args-&gt;getEntity();

    $id = $entity-&gt;getId();

    // process entity date here
}</pre>
<p>As you can see getting the ID is really very simple. Annoying it took me so long to work out and so many extensions out there seem to massively over complicate things.</p>
<p>Thanks to <a href="http://twitter.com/#!/jwage">Jonathan Wage</a>, <a href="http://twitter.com/#!/stunami">Stuart Lowes</a> and <a href="http://twitter.com/#!/docteur_klein">Florian Klein</a> for their help on this.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d175').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d175" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;submitHeadline=Doctrine%2C+Event+Listeners+and+persisted+IDs&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;title=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;title=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;title=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;bm_description=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;T=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;title=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;title=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Doctrine%2C+Event+Listeners+and+persisted+IDs+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F12%2Fdoctrine-event-listeners-and-persisted-ids%2F&amp;t=Doctrine%2C+Event+Listeners+and+persisted+IDs" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d175').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d175').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/05/12/doctrine-event-listeners-and-persisted-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco Blog » Blog Archive » Cisco and OpenStack</title>
		<link>http://awesomism.co.uk/2011/05/05/cisco-blog-%c2%bb-blog-archive-%c2%bb-cisco-and-openstack/</link>
		<comments>http://awesomism.co.uk/2011/05/05/cisco-blog-%c2%bb-blog-archive-%c2%bb-cisco-and-openstack/#comments</comments>
		<pubDate>Thu, 05 May 2011 11:53:02 +0000</pubDate>
		<dc:creator>thescoop</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/2011/05/05/cisco-blog-%c2%bb-blog-archive-%c2%bb-cisco-and-openstack/</guid>
		<description><![CDATA[Via Scoop.it &#8211; VirtualizationA few months back, Cisco announced our official support for the OpenStack open-source project. Led by Cisco&#8217;s office of the Cloud CTO (Lew Tucker), Cisco.Show original Bookmark It Hide Sites $$('div.d174').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) });]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Via <a href='http://www.scoop.it/t/virtualization/p/106783487/cisco-blog-blog-archive-cisco-and-openstack'>Scoop.it</a> &#8211; <a href='http://www.scoop.it/t/virtualization'>Virtualization</a><br /><img src='http://img.scoop.it/C63ZGAIpgkqpCtx-WZXFnDl72eJkfbmt4t8yenImKBXEejxNn4ZJNZ2ss5Ku7Cxt' /><br />A few months back, Cisco announced our official support for the OpenStack open-source project. Led by Cisco&#8217;s office of the Cloud CTO (Lew Tucker), Cisco.<br /><a href='http://blogs.cisco.com/datacenter/cisco-and-openstack/'>Show original</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d174').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d174" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;submitHeadline=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;title=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;title=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;title=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;bm_description=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;T=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;title=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;title=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fcisco-blog-%25c2%25bb-blog-archive-%25c2%25bb-cisco-and-openstack%2F&amp;t=Cisco+Blog+%C2%BB+Blog+Archive+%C2%BB+Cisco+and+OpenStack" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d174').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d174').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/05/05/cisco-blog-%c2%bb-blog-archive-%c2%bb-cisco-and-openstack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benifits of Virtual Private Server Hosting &#124; News Today Trends BBC</title>
		<link>http://awesomism.co.uk/2011/05/05/benifits-of-virtual-private-server-hosting-news-today-trends-bbc/</link>
		<comments>http://awesomism.co.uk/2011/05/05/benifits-of-virtual-private-server-hosting-news-today-trends-bbc/#comments</comments>
		<pubDate>Thu, 05 May 2011 10:34:40 +0000</pubDate>
		<dc:creator>thescoop</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/2011/05/05/benifits-of-virtual-private-server-hosting-news-today-trends-bbc/</guid>
		<description><![CDATA[Via Scoop.it &#8211; Virtualization A VPS is partitioned utilizing innovational server software. A virtual server is really a single, dedicated server with hard drive partitioning between companies. Show original Bookmark It Hide Sites $$('div.d172').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) });]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Via <a href="http://www.scoop.it/t/virtualization/p/106687950/benifits-of-virtual-private-server-hosting-news-today-trends-bbc">Scoop.it</a> &#8211; <a href="http://www.scoop.it/t/virtualization">Virtualization</a></p>
<p>A VPS is partitioned utilizing innovational server software. A virtual server is really a single, dedicated server with hard drive partitioning between companies.<br />
<a href="http://bbctrends.com/77458/computer-internet/benifits-of-virtual-private-server-hosting/">Show original</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d172').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d172" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;submitHeadline=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;title=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;title=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;title=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;bm_description=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;T=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;title=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;title=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fbenifits-of-virtual-private-server-hosting-news-today-trends-bbc%2F&amp;t=Benifits+of+Virtual+Private+Server+Hosting+%7C+News+Today+Trends+BBC" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d172').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d172').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/05/05/benifits-of-virtual-private-server-hosting-news-today-trends-bbc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symantec to Extend Leading Backup Software to the Cloud and Appliances</title>
		<link>http://awesomism.co.uk/2011/05/05/symantec-to-extend-leading-backup-software-to-the-cloud-and-appliances/</link>
		<comments>http://awesomism.co.uk/2011/05/05/symantec-to-extend-leading-backup-software-to-the-cloud-and-appliances/#comments</comments>
		<pubDate>Thu, 05 May 2011 10:34:25 +0000</pubDate>
		<dc:creator>thescoop</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/2011/05/05/symantec-to-extend-leading-backup-software-to-the-cloud-and-appliances/</guid>
		<description><![CDATA[Via Scoop.it &#8211; VirtualizationSymantec Corp. today announced a new approach to help small and mid-sized organizations protect data through new delivery models including Backup&#8230; Read more at VMblog.com.Show original Bookmark It Hide Sites $$('div.d171').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) });]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Via <a href='http://www.scoop.it/t/virtualization/p/106711428/symantec-to-extend-leading-backup-software-to-the-cloud-and-appliances'>Scoop.it</a> &#8211; <a href='http://www.scoop.it/t/virtualization'>Virtualization</a><br /><img src='http://img.scoop.it/4NXXL0ddu_zAchuHHQWS5Tl72eJkfbmt4t8yenImKBXEejxNn4ZJNZ2ss5Ku7Cxt' /><br />Symantec Corp. today announced a new approach to help small and mid-sized organizations protect data through new delivery models including Backup&#8230; Read more at VMblog.com.<br /><a href='http://vmblog.com/archive/2011/05/04/symantec-to-extend-leading-backup-software-to-the-cloud-and-appliances.aspx'>Show original</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d171').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d171" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;submitHeadline=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;title=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;title=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;title=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;bm_description=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;T=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;title=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;title=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F05%2F05%2Fsymantec-to-extend-leading-backup-software-to-the-cloud-and-appliances%2F&amp;t=Symantec+to+Extend+Leading+Backup+Software+to+the+Cloud+and+Appliances" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d171').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d171').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/05/05/symantec-to-extend-leading-backup-software-to-the-cloud-and-appliances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Related models and right constraints with Doctrine 1.2</title>
		<link>http://awesomism.co.uk/2011/03/25/160/</link>
		<comments>http://awesomism.co.uk/2011/03/25/160/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 15:37:38 +0000</pubDate>
		<dc:creator>Harry Walter</dc:creator>
				<category><![CDATA[Design & Development]]></category>
		<category><![CDATA[Facts, Hints and Tips]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/?p=160</guid>
		<description><![CDATA[So a couple of days ago I cam across a problem with a site I was working on and have only just found the solution. I know it&#8217;s probably something very simple to work out but I just couldn&#8217;t work out where to look. The Problem So I have three tables all related, simplified to: [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>So a couple of days ago I cam across a problem with a site I was working on and have only just found the solution. I know it&#8217;s probably something very simple to work out but I just couldn&#8217;t work out where to look.</p>
<h2>The Problem</h2>
<p>So I have three tables all related, simplified to:</p>
<blockquote>
<h3>Module</h3>
<ul>
<li>id</li>
</ul>
<h3>Survey</h3>
<ul>
<li>id</li>
<li>survey_id</li>
</ul>
<h3>Entry</h3>
<ul>
<li>id</li>
<li>survey_id</li>
<li>user_id</li>
</ul>
</blockquote>
<p>I wanted to be able to get all modules with surveys (each module <strong>MUST</strong> have a survey) with any entries that exist for that user.</p>
<h3>Trial and Error</h3>
<p>I initially tried several ways to get data and thought it was working fine. Using the following query returned all modules if my user had no entries but also included modules that I had submitted an entry for.</p>
<pre name="code" class="php">return Doctrine_Query::create()
-&gt;from('LearningModule m')
-&gt;innerJoin('m.Survey s')
-&gt;innerJoin('m.Tree t')
-&gt;leftJoin('s.Entry e')
-&gt;where('e.user_id = ? OR e.id IS NULL', $user_id)
-&gt;andWhere('m.is_active = ?', 1)
-&gt;andWhere('m.release_date &lt;= NOW()') -&gt;orderBy('e.id DESC, m.release_date')
-&gt;setHydrationMode($hydrationMode)
-&gt;execute();</pre>
<p>This worked fine when I only had one suer in the system but problems arose as soon as I had another user creating entries. If user1 created and entry for module1, user2 would no longer see module1.</p>
<h3>Simples</h3>
<p>So with a little digging the the Doctrine API and a simple search of the MySQL site I found you could achieve what I wanted with the leftJoin method.</p>
<pre name="code" class="php">return Doctrine_Query::create()
-&gt;from('LearningModule m')
-&gt;innerJoin('m.Survey s')
-&gt;innerJoin('m.Tree t')
-&gt;leftJoin('s.Entry e ON e.survey_id = s.id AND e.user_id = ?', $user_id)
-&gt;where('m.is_active = ?', 1)
-&gt;andWhere('m.release_date &lt;= NOW()') -&gt;orderBy('e.id DESC, m.release_date')
-&gt;setHydrationMode($hydrationMode)
-&gt;execute();</pre>
<p>So now any user can see all modules as MySQL will return all module rows and any entries if they exist for that user. Note that you can pass parameters to bind tot he query much the same as you can with the where method.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d160').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d160" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;submitHeadline=Related+models+and+right+constraints+with+Doctrine+1.2&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;title=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;title=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;title=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;bm_description=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;T=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;title=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;title=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Related+models+and+right+constraints+with+Doctrine+1.2+@+http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2011%2F03%2F25%2F160%2F&amp;t=Related+models+and+right+constraints+with+Doctrine+1.2" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d160').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d160').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2011/03/25/160/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cost effective coding with Vim</title>
		<link>http://awesomism.co.uk/2009/08/16/cost-effective-coding/</link>
		<comments>http://awesomism.co.uk/2009/08/16/cost-effective-coding/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 08:57:02 +0000</pubDate>
		<dc:creator>Harry Walter</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHPEdit]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Text Editor]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/?p=46</guid>
		<description><![CDATA[Before i start I&#8217;d just like to make a note that I&#8217;m not trying to tell you the best way to code, or the best software available; simply how I do it as an aid to those starting out. There are a lot of software solutions around varying in cost and usefulness to aid in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<address>Before i start I&#8217;d just like to make a note that I&#8217;m not trying to tell you the best way to code, or the best software available; simply how I do it as an aid to those starting out.</address>
<p>There are a lot of software solutions around varying in cost and usefulness to aid in developing code and managing projects, but which one should you choose?</p>
<p>Often it comes down to cost but what do I mean by cost. Now obviously you can look at something like <a href="http://www.amazon.co.uk/gp/product/B001G8Y7B8?ie=UTF8&amp;tag=awesomism-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B001G8Y7B8">Adobe Dreamweaver CS4 (PC)</a> and see that at a cost of £378.35 new <small>(at time of posting)</small> this is out of reach of most peoples budgets.</p>
<p>There a lot of free solutions available that all do a great job, like <a href="http://www.phpedit.com/en/download">PHPEdit</a>, but what most people don&#8217;t realise is that there are hidden costs with these options. Let&#8217;s use PHPEdit and <a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-php-galileo-win32.zip">Eclipse for PHP</a> while greate products for PHP development, have not quite been up to the task.</p>
<p>So what other costs are there? Well for most people these are simple solutions that are spot on and meet their requirements, but for me they just weren&#8217;t up to scratch. A project i was working on recently had become quite large and the code base was very extensive, trying to manage the project in most of these solutions was impossible, simply because the project was so large. So the first hidden cost found was the requirements on my development PC. To effectively use these solutions I would need to spend out to get a high spec computer just to allow me to view my project and load files from the editor.</p>
<p>Ok so for most people that&#8217;s not an issue, but have you ever thought about the time it takes to setup one of these environements and tweak settings until you are happy with the result? It can take ages! In comes VI.</p>
<h2>VI Improved (VIM)</h2>
<p><a href="http://www.vim.org/">VI</a> is a standarad editor available on all linux flavours, either pre-installed or simple to install from packages. Although great VI is not a develpoment environment, it is simply a text editor, free and as a bonus supporting charity.</p>
<p>Here is a small snippet describing VIM from their website:</p>
<blockquote><p>Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor &#8216;Vi&#8217;, with a more complete feature set.</p>
<p>Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.</p></blockquote>
<p>Vim is not for everyone, for one the Vim website maintains that Vim WILL NOT hold the users hand, unlike many of the solutions out there today. What it will do is enable you to code in an efficient and cost effective way.</p>
<p>Personally I love Vim and use it for all my own development, it&#8217;s so easy to setup and is great for &#8220;just working&#8221; without all the fussing with settings. Not only that, if i need something more configured to a particular need, Vim does it.</p>
<h2>Great! So what can I do with Vim?</h2>
<p>I&#8217;m not going to go through every aspect of Vim and options you can set, but here are a few i sue when working with PHP, especially when working with frameworks like <a href="http://www.symfony-project.org/">Symfony</a>.</p>
<h3>Tabs, Shift width and spacing</h3>
<p>To keep code tidy i like to stick to the same code layout standards as the framework i&#8217;m working in. TO do soVim can be configured to use specific settings for tabs, lettings spacing, line heights etc. So first let&#8217;s take a look at tab spacing.</p>
<p>Setting up Vim couldn&#8217;t be easier simply edit a Vim config file (to be refered to vimrc):</p>
<pre>$ vi ~/.vimrc</pre>
<p>Note my usage of the &#8216;vi&#8217; command to edit the file. This will use my default settings with Vim to open the file in a text editor instance.</p>
<p>Now let&#8217;s add some settings, i&#8217;m not going to go through all the command available to Vi and am going to assume you can use unix systems and Vi before attempting any of my suggestions. If not <a href="http://www.vim.org/docs.php">here is some great documentation</a>.</p>
<pre>set tabstop=2</pre>
<p>This will set the number of spaces a tab is equal to (mmost systems this defaults to 4)</p>
<pre>set expandtabs</pre>
<p>This will expand all tabs into spaces, I find this makes it easier to manage code layout</p>
<pre>set shiftwidth=2</pre>
<p>This is mostly used for code indenting and for moving blocks of code. Best to make this match your setting for tabspace</p>
<pre>set autoindent</pre>
<p>This will enable auto indenting of code on carriage return</p>
<pre>set smartindent</pre>
<p>This will make Vim attempt to work out where it should tab in , or out, the next line of code. For example:</p>
<pre>   function test() {
   --&gt;
&lt; --}</pre>
<p>These are some of the settings I use for my own development. Now that we have this in our vimrc file Vim will automatically use these settings whenever we edit a file with Vim. There is a way to use seperate Vim settings with different code lanuages but I will not cover this in this post.</p>
<p>Note if you don&#8217;t want these settings all the time, you can run them during edit time by typing them directly into the editor screen e.g.</p>
<pre>:set tabstop=2</pre>
<h2>Syntax Highlighting</h2>
<p>Another great feature of Vim is the ability to turn on syntax highlighting. Vim will use patterns to match code and highlight it making coding easier. For PHP in particular this is great since Vim nows about many of the built in PHP functions and will highlight them as such, making it easier to spot mispellings before you attemp to run the script.</p>
<p>Turning on syntax highlighting is a breeze, again this command can be run in the editor during use.</p>
<pre>set syntax=on</pre>
<p>Simple eh? Making changes to Vims settings pretty much all envolve one liners.</p>
<h2>More than one file please&#8230;</h2>
<p>One of the biggest complaints I hear about people using Vim is that they can&#8217;t see more than one file open at a time. Having been used to Dreamweavers tabbed interface to file editing. Well you can, all it takes is some simple commands.</p>
<h3>Creating tabs</h3>
<p>Opening a file in a new tab is really simple. There are several ways to do it but the easiest way, and usually the way i do it is with:</p>
<pre>:tabe /path/to/file</pre>
<p>Don&#8217;t worry if you don&#8217;t know where your file is exactly, Vim wil use the tab key to auto-complete the same way as the shell prompt does.</p>
<h3>Moving tabs</h3>
<p>Vim recognises tabs has 0 based index, this means your first tab is tab 0. Moving tabs around envolves knowing the numbers of your tabs, but for a smalll number of tabs this is easy. To move a tabs position to alongside another tab you can use:</p>
<pre>:tabm 2</pre>
<p>This will move the current tab into the place of tab 2 (your third tab) and shift all mthe following tabs along by 1.</p>
<h3>Navigating between tabs</h3>
<p>When using tabs it&#8217;s vital to be able to navigate between tabs, makes them pretty pointless otherwise. Vim has a couple of useful commands that allow you to go back and forth between tabs.</p>
<pre>:tabn - Go to the <span style="text-decoration: underline;">n</span>ext tab</pre>
<pre>:tabp - Go to the <span style="text-decoration: underline;">p</span>revious tab</pre>
<h3>Closing tabs</h3>
<p>In Vim you can close a tab the way you would any normal Vim instance (a tab being just a nested instance of Vim). There is another handy command that allows you to close all tabs currently open.</p>
<pre>:qall</pre>
<p>q being the normal Vim command for closing a tab, qall simply tells Vim to close all instances nested with the current instance.</p>
<p>I&#8217;m not an expert and I&#8217;d love to hear other peoples experiences with Vim and text editors. As per usual, any corrections or suggestions please let me know and I will put them in.</p>
<p>I&#8217;ve just been told I&#8217;ve no mentioned anything for those that use Vim on a graphical desktop so I like to point out Vim&#8217;s pretty sister gVim. Although very similar gVim does have some advantges. One major one being a GUI interface, so less keyboard commands to remember but also syntax highlighted has much better support and range on a graphical desktop.</p>
<p>Thanks to Simon Green at Bluhalo It for the tip.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d46').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d46" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;submitHeadline=Cost+effective+coding+with+Vim&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;title=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;title=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;title=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;bm_description=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;T=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;title=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;title=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Cost+effective+coding+with+Vim+@+http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2009%2F08%2F16%2Fcost-effective-coding%2F&amp;t=Cost+effective+coding+with+Vim" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d46').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d46').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2009/08/16/cost-effective-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony 1.2, Doctrine 1.1 and saving relationships</title>
		<link>http://awesomism.co.uk/2009/05/19/symfony-12-doctrine-12-and-saving-relationships/</link>
		<comments>http://awesomism.co.uk/2009/05/19/symfony-12-doctrine-12-and-saving-relationships/#comments</comments>
		<pubDate>Tue, 19 May 2009 20:39:56 +0000</pubDate>
		<dc:creator>Harry Walter</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://awesomism.co.uk/?p=20</guid>
		<description><![CDATA[When creating a form in Symfony 1.2 sometimes you may want to use Doctrine to automatically save your related data. Since the update to 1.1 there is a small problem in that this doesn't work.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<h1>Saving related data in forms</h1>
<p>When creating a form in Symfony 1.2 sometimes you may want to use Doctrine to automatically save your related data. Since the update to 1.1 there is a small problem in that this doesn&#8217;t work.</p>
<p>For example let&#8217;s take the Faqs section. Each FAQ can have MANY FAQ groups and each group can have MANY FAQs. So when we edit an FAQ we have the option (checkboxes) to choose which groups to assign the current FAQ to.</p>
<p>Ordinarily Doctrine would handle saving these relationships but unfortunately we have to take care of letting the model know what it needs to save ourselves. We do this by overloading the doSave method of a form in order for us to set the linkage and tell the model that the relations should be set as modified and therefore saved. Fortunately since Doctrine would normally be expected to handle this behaviour there are methods that make this easy for us.</p>
<p>First we need to overload the doSave method and this must match the interface in the form class, in this case PluginFaqForm.class.php:</p>
<pre name="code" class="php">public function doSave($con = null)
{
}</pre>
<p>Then we need to unlink all relations for our groups:</p>
<pre name="code" class="php">$this-&gt;getObject()-&gt;unlink('FaqGroups');</pre>
<p><em>&#8220;FaqGroups&#8221; would of course be replaced with the name of you alias.</em></p>
<p>Why unlink? well this tells doctrine to remove all references to other records with that alias. This is so that we can correctly blanket remove the relations in case we uncheck any in the form. Because we haven&#8217;t passed any other options to this method, it will assume we want to unlink all records and also that it will store these changes for future modifications before committing to the database.</p>
<p>So now we need to atually link our selected groups:</p>
<pre name="code" class="php">$this-&gt;getObject()-&gt;link('FaqGroups', $this-&gt;getValue('faq_gropus_list'));</pre>
<p>We have added the the aias as the first parameter so that doctrine knows which relationships to setup. The second parameter is and array of ids to setup the relationships with, in this case an array of checkbox values taken directly from our form.</p>
<p>Now we need to actually save the changes so lets tell Doctrine to carry on with it&#8217;s normal process:</p>
<pre name="code" class="php">parent::doSave($con);</pre>
<p>So this in total looks like:</p>
<pre name="code" class="php">public function doSave($con = null)
{
  $this-&gt;getObject()-&gt;unlink('FaqGroups');
  $this-&gt;getObject()-&gt;link('FaqGroups', $this-&gt;getValue('faq_groups_list'));
  parent::doSave($con);
}</pre>
<p>All you need to do is drop this into your form to overload the parent methods, then change the alias and away you go. This can be used as many times as you wish just by copying the unlink and link command lines.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d20').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d20" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;submitHeadline=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;title=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;title=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;title=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;bm_description=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;T=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;title=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;title=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships+@+http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fawesomism.co.uk%2F2009%2F05%2F19%2Fsymfony-12-doctrine-12-and-saving-relationships%2F&amp;t=Symfony+1.2%2C+Doctrine+1.1+and+saving+relationships" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://awesomism.co.uk/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d20').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d20').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://awesomism.co.uk/2009/05/19/symfony-12-doctrine-12-and-saving-relationships/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

