<?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>Red Yellow &#187; Code</title>
	<atom:link href="http://redyellow.co.uk/category/development/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://redyellow.co.uk</link>
	<description>Sport, Mobiles, Development and did I mention Sport?</description>
	<lastBuildDate>Thu, 29 Jul 2010 12:57:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mobile CakePHP Apps</title>
		<link>http://redyellow.co.uk/mobile-cakephp-apps/</link>
		<comments>http://redyellow.co.uk/mobile-cakephp-apps/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 19:22:23 +0000</pubDate>
		<dc:creator>Rich Gubby</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[refactor]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[vendor]]></category>

		<guid isPermaLink="false">http://redyellow.co.uk/?p=648</guid>
		<description><![CDATA[It feels like an age ago that I wrote a component and helper for CakePHP that could mobilize an app. Since then, things in the WAPL and Wapple world have moved on at a rate of knots and it&#8217;s time to re-write, re-factor and re-engineer the mobile cake code to keep it up to date. [...]


Related posts:<ol><li><a href='http://redyellow.co.uk/rest-or-soap-or-dont-care/' rel='bookmark' title='Permanent Link: REST or SOAP? Or don&#8217;t care?'>REST or SOAP? Or don&#8217;t care?</a></li>
<li><a href='http://redyellow.co.uk/php-classes-wapl-code-released/' rel='bookmark' title='Permanent Link: PHP Classes &#8211; WAPL code released'>PHP Classes &#8211; WAPL code released</a></li>
<li><a href='http://redyellow.co.uk/wordpress-mobile-plugin-version-1-2-is-here/' rel='bookmark' title='Permanent Link: WordPress Mobile Plugin Version 1.2 is here'>WordPress Mobile Plugin Version 1.2 is here</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-652" title="cake-logo" src="http://redyellow.co.uk/wp-content/uploads/2009/09/cake-logo-150x150.png" alt="cake-logo" width="105" height="105" />It feels like an age ago that I wrote a component and helper for CakePHP that could mobilize an app. Since then, things in the WAPL and Wapple world have moved on at a rate of knots and it&#8217;s time to re-write, re-factor and re-engineer the mobile cake code to keep it up to date.</p>
<p><span id="more-648"></span>The first version had a pretty basic component, used SOAP to communicate and had no in-built schema check to always produce valid WAPL code.</p>
<h3>PHP Package as a Vendor</h3>
<p>But now there is a PHP package available that handles the schema check and communication can be done by either REST or SOAP (the preferred method would now seem to be REST seeing as it has better error handling and doesn&#8217;t trigger a fatal error if a soap client can&#8217;t be created).</p>
<p>Plugging that package in as a vendor should be dead easy (although it does need a few little mods and upgrades of its own first) and then it&#8217;ll be just a case of writing a component and helper to make use of it.</p>
<p>Hopefully I&#8217;ll have something ready this week so you&#8217;ll be able to mobilize your real world cake apps!</p>
<p>Let me know if you have any ideas for how it should be built &#8211; as a component &amp; helper? Maybe a plugin? Or just keep it as a vendor.. or maybe all of the above!</p>
<img src="http://redyellow.co.uk/?ak_action=api_record_view&id=648&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://redyellow.co.uk/rest-or-soap-or-dont-care/' rel='bookmark' title='Permanent Link: REST or SOAP? Or don&#8217;t care?'>REST or SOAP? Or don&#8217;t care?</a></li>
<li><a href='http://redyellow.co.uk/php-classes-wapl-code-released/' rel='bookmark' title='Permanent Link: PHP Classes &#8211; WAPL code released'>PHP Classes &#8211; WAPL code released</a></li>
<li><a href='http://redyellow.co.uk/wordpress-mobile-plugin-version-1-2-is-here/' rel='bookmark' title='Permanent Link: WordPress Mobile Plugin Version 1.2 is here'>WordPress Mobile Plugin Version 1.2 is here</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://redyellow.co.uk/mobile-cakephp-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<custom_fields><aktt_notify_twitter>no</aktt_notify_twitter></custom_fields>	</item>
		<item>
		<title>WordPress on Load Balanced Servers</title>
		<link>http://redyellow.co.uk/wordpress-on-load-balanced-servers/</link>
		<comments>http://redyellow.co.uk/wordpress-on-load-balanced-servers/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 17:49:06 +0000</pubDate>
		<dc:creator>Rich Gubby</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[load balanced]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[wordpress plugin on NFS]]></category>

		<guid isPermaLink="false">http://redyellow.co.uk/?p=614</guid>
		<description><![CDATA[Picture the scene, you&#8217;ve had a great idea for a blog and have decided to use WordPress as your blogging software of choice. And as you&#8217;re going to be getting an insane amount of visitors (after all, you&#8217;ve got a great idea, right?) you&#8217;ve decided to buy some decent hardware to cope with the traffic. [...]


Related posts:<ol><li><a href='http://redyellow.co.uk/top-5-wordpress-plugins/' rel='bookmark' title='Permanent Link: Top 5 WordPress Plugins'>Top 5 WordPress Plugins</a></li>
<li><a href='http://redyellow.co.uk/wordpress-mobile-plugin-1-2-1/' rel='bookmark' title='Permanent Link: WordPress Mobile Plugin 1.2.1'>WordPress Mobile Plugin 1.2.1</a></li>
<li><a href='http://redyellow.co.uk/wordpress-mobile-plugin-version-1-2-is-here/' rel='bookmark' title='Permanent Link: WordPress Mobile Plugin Version 1.2 is here'>WordPress Mobile Plugin Version 1.2 is here</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-616" title="light-bulb-thumb5246229" src="http://redyellow.co.uk/wp-content/uploads/2009/09/light-bulb-thumb5246229-150x150.jpg" alt="light-bulb-thumb5246229" width="90" height="90" />Picture the scene, you&#8217;ve had a great idea for a blog and have decided to use WordPress as your blogging software of choice. And as you&#8217;re going to be getting an insane amount of visitors (after all, you&#8217;ve got a great idea, right?) you&#8217;ve decided to buy some decent hardware to cope with the traffic.<br />
<span id="more-614"></span></p>
<p>The setup you&#8217;d probably go for is some sort of load balanced setup, with multiple web servers and possibly a couple of database servers behind the scenes. You should also be thinking about the wonders of virtualization and all the benefits that brings but that&#8217;s for another day.</p>
<p>Having multiple web servers brings about its own set of issues. Your blog code needs to be deployed to all web servers (preferably at the same time) so that if you get visitors that happen to hit different machines, you give them the same experience.</p>
<h3>Deployments and Uploads</h3>
<p>But that&#8217;s not so much of a problem &#8211; you could deploy code to all servers with <a href="http://ant.apache.org/">Ant </a>or <a href="http://www.capify.org/index.php/Capistrano">Capistrano</a>, or even write your own system to do it exactly to your requirements.</p>
<p><img class="alignleft size-thumbnail wp-image-618" title="wordpress-plugin" src="http://redyellow.co.uk/wp-content/uploads/2009/09/wordpress-plugin-150x150.jpg" alt="wordpress-plugin" width="90" height="90" />However, in this kind of setup, you&#8217;re going to come unstuck with plugins, themes and uploads. WordPress has an awesome upload utility, but the file you select from your local computer will get uploaded to a location on a single machine in your server farm. When a visitor lands on a different machine, they won&#8217;t see the upload. If you&#8217;re using the automatic add plugin or theme wizard built into the newer version of WordPress then it&#8217;s the same situation.</p>
<h3>Link to NFS locations</h3>
<p>But the situation is not nearly as dire as you may think though. There are loads of ways to combat it &#8211; and it&#8217;s a piece of cake if you&#8217;re using Linux! The easiest way is to create an NFS share on web server 1 and link to it on web server 2 so that the &#8220;/plugins&#8221; directory on 2 actually points to the location on 1. Easy!</p>
<p>If you&#8217;ve got a file server, even better &#8211; create your NFS on there and link to that location instead so that content really is separate from your code!</p>
<p>With windows it&#8217;s just as easy with shared directories &#8211; same principle, just a different terminology.</p>
<p>The only issue you&#8217;ve got left is that some plugins may have the paths to their files built slightly oddly so that they load the wrong files. But then, if you&#8217;ve got errors with the plugins, it may be time to look for alternatives!</p>
<p>Have you had any problems with WordPress on load balanced servers? How did you solve it or did you choose another setup?</p>
<img src="http://redyellow.co.uk/?ak_action=api_record_view&id=614&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://redyellow.co.uk/top-5-wordpress-plugins/' rel='bookmark' title='Permanent Link: Top 5 WordPress Plugins'>Top 5 WordPress Plugins</a></li>
<li><a href='http://redyellow.co.uk/wordpress-mobile-plugin-1-2-1/' rel='bookmark' title='Permanent Link: WordPress Mobile Plugin 1.2.1'>WordPress Mobile Plugin 1.2.1</a></li>
<li><a href='http://redyellow.co.uk/wordpress-mobile-plugin-version-1-2-is-here/' rel='bookmark' title='Permanent Link: WordPress Mobile Plugin Version 1.2 is here'>WordPress Mobile Plugin Version 1.2 is here</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://redyellow.co.uk/wordpress-on-load-balanced-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<custom_fields><aktt_notify_twitter>no</aktt_notify_twitter></custom_fields>	</item>
		<item>
		<title>When is a bug not a bug?</title>
		<link>http://redyellow.co.uk/when-is-a-bug-not-a-bug/</link>
		<comments>http://redyellow.co.uk/when-is-a-bug-not-a-bug/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 19:59:21 +0000</pubDate>
		<dc:creator>Rich Gubby</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[undocumented features]]></category>

		<guid isPermaLink="false">http://redyellow.co.uk/?p=603</guid>
		<description><![CDATA[I used to work with someone who said that most bugs in software didn&#8217;t exist. His reckoning was down to the fact that most specifications for functionality aren&#8217;t tight enough. For example, if the spec for an adding function was to add two numbers together, adding 5 and 9 together and returning a value of [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-604 alignleft" title="computer-bug" src="http://redyellow.co.uk/wp-content/uploads/2009/08/computer-bug-150x150.jpg" alt="computer-bug" width="105" height="105" />I used to work with someone who said that most bugs in software didn&#8217;t exist.</p>
<p>His reckoning was down to the fact that most specifications for functionality aren&#8217;t tight enough. For example, if the spec for an adding function was to add two numbers together, adding 5 and 9 together and returning a value of 162 was acceptable. Even returning nothing, or null, or a gazillion was also ok. The specification should have said that the function had to add two numbers and return the correct mathematical result.</p>
<p><span id="more-603"></span>For a developer, this is great news. You don&#8217;t have bugs anymore, you have &#8220;undocumented features&#8221;. Feature specifications get better and it&#8217;s easier to write code that satisfies the requirements.</p>
<h3>It&#8217;s a bug!</h3>
<p>But I personally think blaming bugs, and they are bugs, on the specification writers is lazy. Bug reporters, whether they are developers or not can get quickly hacked off with being told that an error they&#8217;ve found isn&#8217;t actually a bug, but it&#8217;s the fact that it&#8217;s actually been implemented exactly to spec.</p>
<p>A bit of common sense in all of this is definitely required. If you need an adding function, it&#8217;s obvious to anyone that it should return the result. If the spec doesn&#8217;t say so, just do it and move on.</p>
<p>And if you need a function to return the results of whether a visitor is a mobile device or not, it&#8217;s probably wise to actually return the value rather than store it in a cookie. Oops!</p>
<img src="http://redyellow.co.uk/?ak_action=api_record_view&id=603&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://redyellow.co.uk/when-is-a-bug-not-a-bug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<custom_fields><aktt_notify_twitter>no</aktt_notify_twitter></custom_fields>	</item>
	</channel>
</rss>
