<?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>Jordan Hall &#187; Programming</title>
	<atom:link href="http://jordanhall.co.uk/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://jordanhall.co.uk</link>
	<description>Jordan Hall - programmer and geek</description>
	<lastBuildDate>Thu, 19 Jan 2012 11:36:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bitcoin Helper 0.11 &#8211; Error handling and caching</title>
		<link>http://jordanhall.co.uk/social-media-search-engine-optimisation-seo/bitcoin-helper-0-11-error-handling-and-exchange-rate-caching-13011366/</link>
		<comments>http://jordanhall.co.uk/social-media-search-engine-optimisation-seo/bitcoin-helper-0-11-error-handling-and-exchange-rate-caching-13011366/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 09:49:13 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Social Media & Search Engine Optimisation (SEO)]]></category>
		<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[crypto-currency]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1366</guid>
		<description><![CDATA[This is a quick post to announce the release of Bitcoin Helper 0.11. Bitcoin Helper 0.11 contains significantly better error handler than the initial release (0.1) and also makes the file-based caching of the JSON retrieved from bitcoincharts.com mandatory. Error Handling It can now handle internal issues with network communication to the data source and incorrect [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jordanhall.co.uk/wp-content/uploads/2012/01/error_warning_icon.png"><img class="alignright  wp-image-1371" title="Warning icon" src="http://jordanhall.co.uk/wp-content/uploads/2012/01/error_warning_icon.png" alt="Warning icon" width="63" height="63" /></a>This is a quick post to announce the release of Bitcoin Helper 0.11. Bitcoin Helper 0.11 contains significantly better error handler than the initial release (0.1) and also makes the file-based caching of the JSON retrieved from bitcoincharts.com mandatory.</p>
<h2>Error Handling</h2>
<p>It can now handle internal issues with network communication to the data source and incorrect JSON formatting of retrieved data. Bitcoin Helper 0.11 also checks to ensure the requested ISO 4217 currency code, for conversion to Bitcoin, is supported.</p>
<p>Certain functions in Bitcoin Helper now return a negative integer in the case that an error occurs. Details regarding these error codes can be found in the source code comments of bitcoin_helper.php. The relevant section of commenting is quoted below for convenience.</p>
<blockquote><p>/* Information about error codes</p>
<p>Certain functions within Bitcoin Helper (0.11 onwards) will return<br />
numeric error codes in the case of unexpected error or failure.</p>
<p>You should make sure to check the returned value for error codes<br />
(inte<del>r</del>gers less than zero) in your code. The following reference<br />
shows the error numbers and an explanation.</p>
<p>* -1 = Network error retrieving data from bitcoincharts.com<br />
* -2 = Error decoding JSON data retrieved from bitcoincharts.com<br />
* -3 = Currency code not supported<br />
* -4 = Could not write to cache file &#8211; check permissions!<br />
*/</p></blockquote>
<h2>File-based Caching</h2>
<p>Bitcoin Helper 0.1 would cache the JSON containing currency exchange rates to a file if possible. This caching is now a requirement as of Bitcoin Helper 0.11.</p>
<p>Bitcoin Helper will attempt to write a file named &#8216;bitcoin_weighted_prices.json&#8217;. If this file is not writeable, you will receive error code -4.</p>
<p>If you receive this error, you will need to alter the permissions of the directory to allow this file to be created. Once created, you can revert the directory permissions if you desire and make only the individual &#8216;bitcoin_weighted_prices.json&#8217; file writeable.</p>
<h2>Download Bitcoin Helper 0.11</h2>
<p>To download Bitcoin Helper 0.11 with improved error handling, please go to the <a title="Bitcoin Helper – PHP Bitcoin class" href="http://jordanhall.co.uk/projects/bitcoin-helper-php-bitcoin-class/">Bitcoin Helper</a> project page.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/social-media-search-engine-optimisation-seo/bitcoin-helper-0-11-error-handling-and-exchange-rate-caching-13011366/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcoin Helper 0.1 &#8211; Converting currencies to Bitcoin</title>
		<link>http://jordanhall.co.uk/web-applications-cloud-computing/bitcoin-helper-0-1-converting-currencies-to-bitcoin-41011357/</link>
		<comments>http://jordanhall.co.uk/web-applications-cloud-computing/bitcoin-helper-0-1-converting-currencies-to-bitcoin-41011357/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 15:19:41 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web, Applications & Cloud Computing]]></category>
		<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[crypto-currency]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1357</guid>
		<description><![CDATA[Over the past few months, I&#8217;ve gained quite an interest in the crypto-currency Bitcoin. Bitcoin is a new currency which has no physical form, but can be considered Internet cash. If you want more information on Bitcoin in general, take a look at the We Use Coins website, which has a great introductory video and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jordanhall.co.uk/wp-content/uploads/2012/01/bitcoin.png"><img class="alignright  wp-image-1359" title="Bitcoin logo" src="http://jordanhall.co.uk/wp-content/uploads/2012/01/bitcoin-150x150.png" alt="" width="120" height="120" /></a>Over the past few months, I&#8217;ve gained quite an interest in the crypto-currency Bitcoin.</p>
<p>Bitcoin is a new currency which has no physical form, but can be considered Internet cash. If you want more information on Bitcoin in general, take a look at the <a href="http://www.weusecoins.com/" target="_blank">We Use Coins</a> website, which has a great introductory video and articles/links to other useful Bitcoin resources.</p>
<h2>Bitcoin Helper 0.1 Released</h2>
<p>As part of my interest in Bitcoin, I&#8217;ve decided to start a mini-project in the form of <a href="http://jordanhall.co.uk/projects/bitcoin-helper-php-bitcoin-class/">Bitcoin Helper</a>, a PHP class which will contain multiple methods to aid web site/application developers in integrating Bitcoin related functionality into their systems. The first function, which comes in Bitcoin Helper 0.1, is a really easy to use converter that can convert non Bitcoin currencies into the equivalent Bitcoin value and return the result.</p>
<p>To see how simple it is to use, see the following code snippet.</p>
<p style="padding-left: 30px;"><code>include "bitcoin_helper.php";<br />
$bh = new bitcoin_helper;<br />
echo $bh-&gt;convert_to_btc("GBP", 10);</code></p>
<p>This will convert £10 (Great British Pounds) into Bitcoin and echo out the result. The following works for USD and Euros as well.</p>
<p style="padding-left: 30px;"><code>echo $bh-&gt;convert_to_btc("USD", 10);<br />
echo $bh-&gt;convert_to_btc("EUR", 10);</code></p>
<p>The trade data for several other currencies is provided from the external source (see the Bitcoin Charts website). If your currency is listed there, entering its ISO 4217 currency code as the first parameter of the convert_to_btc function should allow you to convert any value of that currency into Bitcoin.</p>
<p>Please note that this is the first release of Bitcoin Helper, so I can not guarantee it is bug free. More checks, validation, improvements and new features will be added in the future versions. Feel free to leave a comment with any suggestions.</p>
<p>I hope this very basic Bitcoin Helper release can assist web developers with some simple Bitcoin conversion in their sites.</p>
<h3>Download Bitcoin Helper 0.1</h3>
<p>To download this first version of Bitcoin Helper (0.1), please visit the <a href="http://jordanhall.co.uk/projects/bitcoin-helper-php-bitcoin-class/">Bitcoin Helper project page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/web-applications-cloud-computing/bitcoin-helper-0-1-converting-currencies-to-bitcoin-41011357/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program Design &#8211; &#8220;90% of your users are idiots&#8221;</title>
		<link>http://jordanhall.co.uk/programming/program-design-90-of-your-users-are-idiots-19081285/</link>
		<comments>http://jordanhall.co.uk/programming/program-design-90-of-your-users-are-idiots-19081285/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 12:16:19 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Alex Yumashev]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[idiots]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[IT support]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[program design]]></category>
		<category><![CDATA[software design]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[software documentation]]></category>
		<category><![CDATA[UI design]]></category>
		<category><![CDATA[user interface design]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1285</guid>
		<description><![CDATA[They are. Or at least, it can really help to assume they are. A short while ago, I read this from Alex Yumashev&#8217;s Jitbit blog: I just overheard this conversation between two developers at a co-working site: &#8220;I plan [on] creating a prototype for my new XXXX application, whatcha think it should be &#8211; a web-app, [...]]]></description>
			<content:encoded><![CDATA[<p>They are. Or at least, it can really help to assume they are.</p>
<p style="text-align: left;">A short while ago, I read this from <a href="http://blog.jitbit.com/p/about-this-blog.html" target="_blank">Alex Yumashev&#8217;s</a> <a href="http://blog.jitbit.com/" target="_blank">Jitbit blog</a>:</p>
<blockquote><p>I just overheard this conversation between two developers at a co-working site:</p>
<blockquote><p><strong>&#8220;I plan [on] creating a prototype for my new XXXX application, whatcha think it should be &#8211; a web-app, or a desktop app?&#8221;</strong></p></blockquote>
<p>The answer was:</p>
<blockquote><p><strong>&#8220;90% of your users are idiots who won&#8217;t be able to tell the difference&#8221;</strong></p></blockquote>
<p>I think I just found my answer to <a href="http://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker's_Guide_to_the_Galaxy#Answer_to_the_Ultimate_Question_of_Life.2C_the_Universe.2C_and_Everything_.2842.29" rel="nofollow">the ultimate question of life universe and everything</a> and it&#8217;s not &#8220;42&#8243;.</p>
<p>It&#8217;s <em>&#8220;90% of your users are idiots&#8221;.</em></p>
<p>Now thats a questionable term to describe your customers. I don&#8217;t think 90% of <em>my </em>users are idiots. But. That&#8217;s <em>the</em> way to think of your users when making design decisions and building your interface.</p></blockquote>
<p style="text-align: right;"><a href="http://blog.jitbit.com/2011/06/90-of-your-users-are-idiots.html" target="_blank">Jitbit Blog</a></p>
<p style="text-align: left;">And he&#8217;s very right.</p>
<p style="text-align: left;">Thinking about some of the largest and most successful software developments, this rule applies &#8211; not that 90% of the users of these systems are idiots, but more that they are designed to accommodative for 90% of their users being idiots .</p>
<p style="text-align: left;">Think about the operating systems environment, in which Mac OS X and the Windows series of operating systems are by far the most popular on the desktop. Both of these systems are developed to heavily guide the user through any process or task that he or she wishes to complete, metaphorically holding the users hand throughout each step.</p>
<p style="text-align: left;">The mobile market is the same. Up until very recently, iOS (the Apple operating system powering the iPad and iPhone) was very far in the lead in terms of sales and end-user popularity. Android has only recently, in the past few months starting competing well with iOS. iOS is simple. In my opinion, too simple, but people like it and use it, on a huge scale. 90% of users are idiots. As Android has got more and more user-friendly, it has increased in popularity amongst end-users, along with the ever increasing push from non-Apple phone and tablet manufacturers to use Android.</p>
<p style="text-align: left;">Both user interface and structural application decisions can often benefit from thinking that 90% of your users are idiots.</p>
<ol>
<li>Should I implement feature X in either A or B way? Whichever is easier for those 90%.</li>
<li>Should I design the user interface to promote feature A or B most promotion? Whichever is most appropriate for those 90%.</li>
<li>Do I design this icon that triggers feature X to represent concept A or concept B? Whichever will make the most sense to those 90% of users.</li>
<li>Should I document this little used and/or somewhat obvious feature? Of course &#8211; 90% of your users are idiots.</li>
</ol>
<p>The experts among us do not necessary need or want to be guided though every step of a process with our hands held all the time. Some of us just want to dig into plain text config files and command line interfaces. The developers and the computing enthusiasts, we&#8217;re the remaining 10%.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/programming/program-design-90-of-your-users-are-idiots-19081285/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing PHP Session data in a database</title>
		<link>http://jordanhall.co.uk/programming/storing-php-session-data-in-a-database-20061251/</link>
		<comments>http://jordanhall.co.uk/programming/storing-php-session-data-in-a-database-20061251/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 12:32:20 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[database PHP sessions]]></category>
		<category><![CDATA[database storage]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL server]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP session]]></category>
		<category><![CDATA[PHP session storage]]></category>
		<category><![CDATA[PHP sessions]]></category>
		<category><![CDATA[PHP sessions in MySQL database]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1251</guid>
		<description><![CDATA[I&#8217;ve recently exchanged e-mails with a colleague regarding the storage of PHP sessions data in a MySQL database. To help anyone else interested in using database storage of PHP session information, I have paraphrased / rewritten the content of some of those e-mails below. One of the best ways to implement the database storage of PHP session [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jordanhall.co.uk/wp-content/uploads/2011/06/php-and-mysql-logos.gif"><img class="alignright size-thumbnail wp-image-1276" title="PHP and MySQL logos" src="http://jordanhall.co.uk/wp-content/uploads/2011/06/php-and-mysql-logos-150x150.gif" alt="PHP and MySQL logos" width="150" height="150" /></a>I&#8217;ve recently exchanged e-mails with a colleague regarding the storage of PHP sessions data in a MySQL database. To help anyone else interested in using database storage of PHP session information, I have paraphrased / rewritten the content of some of those e-mails below.</p>
<p>One of the best ways to implement the database storage of PHP session data is via the overriding session handlers built in to PHP. PHP has functions built in to allow you to override the default file based session handlers.</p>
<p>These functions all use PHP&#8217;s normal ways of handling session persistence between the client and the server (by default, via the use of a session ID cookie).</p>
<p>In other words, it utilises the same PHPSESSID cookie that the default file based session storage uses. When using functions that override the session handlers, the first parameter for several of these function is the session id. Upon overriding the functions, PHP will automatically pass the session ID (pulled from the PHPSESSID cookie) to these functions.</p>
<p>The code linked to below can be &#8216;required&#8217; (require &#8220;session_start.php&#8221;) as a drop in replacement for the default PHP session_start() function. This utilises database access to store and retrieve session information. Note that due to the very early point in which PHP processes session handler overrides, objects are not available for use, hence the use of old style &#8216;mysql&#8217; instead of OO based &#8216;mysqli&#8217; (if you find a way around this, I&#8217;d be very interested in hearing about it).</p>
<p style="text-align: center;"><strong><a title="Session Start PHP code" href="http://jordanhall.co.uk/content/sessionstart.txt" target="_blank">Download &#8216;session_start.php&#8217; for database storage of session data</a></strong></p>
<p style="text-align: center;"><strong><a title="SQL Database Table Structure" href="http://jordanhall.co.uk/content/sessionstart_requiredsql.txt" target="_blank">Required Table Structure SQL</a></strong></p>
<p>In terms of performance, there is limited degradation to using database stored sessions with most small to mid range sites, based on my experience and observation. However, larger sites may possiblynotice degradation. In such circumstances, this would likely be related to the MySQL database server load and/or high levels of IO on the MySQL server. Issues of database server load can be mitigated via one or more of the following:</p>
<ul>
<li>Separation of the site database and the session storage database (seperating each to their own server if necessary)</li>
<li>File based caching of session information on the web server system (using standard PHP file reading/writing functions, ensuring that the file cache is updated whenever there are changes to the session information in the database store)</li>
<li>In memory caching (similar to file based caching, but utilising a key to value storage engine which runs in RAM, providing very fast (atomic) access to data) &#8211; using a system such as memcached - <a href="http://memcached.org/" target="_blank">http://memcached.org/</a></li>
</ul>
<p>For building reasonable size websites in which portability is important, the need to load balance is highly probably in the future and where development time permits, I&#8217;d  personal recommend database storage for session information, due to the higher level of flexibility this set-up offers.</p>
<p>I hope this information helps anyone looking to make a PHP powered site just that little bit more portable by placing their users&#8217; session data in a database.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/programming/storing-php-session-data-in-a-database-20061251/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Content Tags and Styling in HTML 5 Markup</title>
		<link>http://jordanhall.co.uk/web-applications-cloud-computing/content-over-styling-in-html-5-markup-46061023/</link>
		<comments>http://jordanhall.co.uk/web-applications-cloud-computing/content-over-styling-in-html-5-markup-46061023/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 12:28:46 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web, Applications & Cloud Computing]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[HTML 5 content tags]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[Reddit]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1023</guid>
		<description><![CDATA[Although some of the most talked about tags coming in HTML 5 are the video, audio and canvas tags, there are many other new tags which primarily focus around content. One of the aims of HTML 5 is to remove styling from the HTML mark-up and ensure all styling is defined within the cascading style sheets where [...]]]></description>
			<content:encoded><![CDATA[<p>Although some of the most talked about tags coming in HTML 5 are the video, audio and canvas tags, there are many other new tags which primarily focus around content. One of the aims of HTML 5 is to remove styling from the HTML mark-up and ensure all styling is defined within the cascading style sheets where it belongs.</p>
<p>In the vast majority of today&#8217;s websites, if a program is required to pick out a particular part of a HTML page, such as the main article, the sidebar or the top navigation, it would have to be programmed to do so on a per website and web page basis. This is because every website structures its HTML differently, unless based on an underlying package with a consistent HTML foot print.</p>
<p>Most current websites therefore use a variety of &lt;p&gt;, &lt;div&gt; and &lt;span&gt; tags to surround their content. These tags define style and do not obviously determine whether the contained content is part of the website&#8217;s navigation system or whether it is the main article or focus of the web page. The new HTML 5 tags aim to change this by explicitly defining content.</p>
<p>Defining content with specific HTML 5 tags will make websites easier to parse by computer programs. This could benefit accessibility readers for the blind and allow content aggregating systems and ‘mash-up’ websites to easily parse, link to and cite your articles. Content aggregation and automation of web page content retrieval is quite fundamental to some of the newer Web 2.0 sites and social networks. Good examples being Facebook&#8217;s automatic retrieval of web page information when a link is entered into a status update, or Reddit&#8217;s automatic thumbnail generation based on images found within the linked web page.</p>
<p>Here is a listed on related HTML content tags, as available from the W3C Schools website.</p>
<ul>
<li>&lt;article&gt; – Defines a main article on a page. Can include cite (citation) and pubdate (publishing date) attributes.</li>
<li>&lt;details&gt; – States content details for a specific section. Can include an open attribute defining whether or not the details within are visible to the end-user.</li>
<li>&lt;figcaption&gt; – States the caption for a figure as defined by the figure tag.</li>
<li>&lt;figure&gt; – Usually used to group a set of elements.</li>
<li>&lt;footer&gt; – Footer layout element. This is used to contain the footer content of the page, usually contains the website name, author and copyright information.</li>
<li>&lt;header&gt; – Header layout element. This tag is designed to contain the top header of a document, usually showing the website logo, page and/or company title and subtitle.</li>
<li>&lt;hgroup&gt; – A tag used to group together heading tags such as &lt;h1&gt;, &lt;h2&gt;, &lt;h3&gt; and so on.</li>
<li>&lt;keygen&gt; – A key generation tag which defines a generated (encryption) key that can be associated with a HTML form.</li>
<li>&lt;meter&gt; – The &lt;meter&gt; tag contains content which is deemed to be a measurement of some sort.</li>
<li>&lt;nav&gt; – The &lt;nav&gt; tags stands for navigation and is designed to surround navigation links, such as those present in a sidebar bar or navigational header/footer.</li>
<li>&lt;summary&gt; – The &lt;summary&gt; tag defines the title of a &lt;details&gt; element.</li>
<li>&lt;time&gt; – This tags contains content which is a statement or measurement of time and/or date/time.</li>
</ul>
<p>Unfortunately, it is likely that HTML 5 content tags with not be adopted completely for quite some time and there will likely continued use of existing HTML mark up and related styling of &lt;div&gt; and &lt;span&gt; tags for quite some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/web-applications-cloud-computing/content-over-styling-in-html-5-markup-46061023/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Explanation of Model View Controller (MVC)</title>
		<link>http://jordanhall.co.uk/programming/simple-explanation-of-model-view-controller-mvc-2206990/</link>
		<comments>http://jordanhall.co.uk/programming/simple-explanation-of-model-view-controller-mvc-2206990/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 12:04:22 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[controllers]]></category>
		<category><![CDATA[CRUD]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[feature cascade]]></category>
		<category><![CDATA[logic]]></category>
		<category><![CDATA[Model View Controller]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[software architectures]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=990</guid>
		<description><![CDATA[Model view controller is a type of software architecture that is designed to separate the programming code that handles presentation, application logic and business logic. This makes systems using a model view controller architecture much simpler to maintain, as locating the code relevant to specific logic is significantly easier. Additionally, it makes expansion of systems much less complex, [...]]]></description>
			<content:encoded><![CDATA[<p>Model view controller is a type of software architecture that is designed to separate the programming code that handles presentation, application logic and business logic.</p>
<p style="text-align: center;"><a href="http://jordanhall.co.uk/wp-content/uploads/2010/06/model-view-controller-mvc-diagram1.png"><img class="aligncenter size-full wp-image-1001" title="Model View Controller (MVC) Diagram" src="http://jordanhall.co.uk/wp-content/uploads/2010/06/model-view-controller-mvc-diagram1.png" alt="Model View Controller MVC Diagram" width="350" height="160" /></a></p>
<p>This makes systems using a model view controller architecture much simpler to maintain, as locating the code relevant to specific logic is significantly easier. Additionally, it makes expansion of systems much less complex, as it avoids the &#8216;feature cascade&#8217; effect in which the addition of a single feature will result in a knock on or butterfly effect throughout the entire system.</p>
<p>The parts of a model view controller system are referred to as models, views and controllers, which makes perfect sense. The definition of these system parts is also quite intuitive.</p>
<ul>
<li><strong>Views</strong> &#8211; Views are entirely for the presentation part of your application. It contains no brains, no logic, no intelligence to the extent permissible by the programming language used. A view is merely the appearance of your application and nothing else.</li>
<li><strong>Controllers</strong> &#8211; A controller handles feedback from the user and logic specific to the application. A controllers job is to receive input from a user, via controls found on the user interface of a view, to process it, communicating with a model if necessary, and then to send output to the user, usually by populating a view with relevant content.</li>
<li><strong>Models</strong> &#8211; Models perform business logic. Business logic, in this case, refers to items that are fundamental to the overall system design. For example, if a library application was constructed, the logic which ensured a library card owner only rented up to 5 books at a time, would be part of a model. Again, as part of the business logic, models also tend to control access to application storage, such as database(s), performing CRUD (creation, updating and deletion) tasks on the stored data.</li>
</ul>
<p>I hope this helps explain the basics of the model view controller software architecture.</p>
<p>If you have any improvements or additions to these definitions or just want to discuss software architectures in general, feel free to use the comments section below.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/programming/simple-explanation-of-model-view-controller-mvc-2206990/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

