<?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>Chapter 42 &#187; backwards compatibility</title>
	<atom:link href="http://chapter42.whitewhale.net/tag/backwards-compatibility/feed/" rel="self" type="application/rss+xml" />
	<link>http://chapter42.whitewhale.net</link>
	<description></description>
	<lastBuildDate>Thu, 30 Sep 2010 17:20:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Coding Ahead of Yourself</title>
		<link>http://chapter42.whitewhale.net/2008/11/24/coding-ahead-of-yourself/</link>
		<comments>http://chapter42.whitewhale.net/2008/11/24/coding-ahead-of-yourself/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 20:41:49 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Behind the scenes]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[backwards compatibility]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[diagnostics]]></category>
		<category><![CDATA[livewhale]]></category>
		<category><![CDATA[lwblog]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[whitewhale]]></category>

		<guid isPermaLink="false">http://chapter42.whaleblogs.net/?p=144</guid>
		<description><![CDATA[When you&#8217;re maintaining a software product which evolves and expands in order to remain competitive and make itself more useful to a user base, it&#8217;s easy to forget to keep all the moving parts in line with changes and new features as you roll them out. However, if this issue isn&#8217;t dealt with, bugs and [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re maintaining a software product which evolves and expands in order to remain competitive and make itself more useful to a user base, it&#8217;s easy to forget to keep all the moving parts in line with changes and new features as you roll them out. However, if this issue isn&#8217;t dealt with, bugs and performance issues will inevitably arise.</p>
<p><a href="http://www.livewhale.com/">LiveWhale</a>, our CMS, is essentially a module-based system. Individual modules can be provided to our customers on a per-client basis. Each module is a self-contained element, that &#8220;registers&#8221; itself in the CMS framework, thereby establishing its functionality throughout. A module is responsible for creating and managing its own data, but if it is flagged as group owned, access to that data is handled by LiveWhale&#8217;s users and groups system.<span id="more-144"></span></p>
<p>It is, of course, possible for an administrator to manage those users and groups, and should a circumstance arise in which a group should be targeted for deletion, LiveWhale automatically cleans up data associated with that group (whether it is stored in a database or the file system) so that it is not orphaned. (This is in fact the case with any piece of data which &#8220;contains&#8221; additional hierarchical data.)</p>
<p>The mechanism we have in place for this is simple, but it is also flexible. Each piece of associated data that has to be cleaned up by a parent marked for deletion can optionally be given to a handler deletion function. For example, if a piece of news stores an image in the file system, the handler function is activated to clean that up as well.</p>
<p>Eventually we added a global activity log to our CMS, LiveWhale. Activity is associated with a user and a group, making this data group owned. As it turned out, the group deletion mechanism possessed a flaw. LiveWhale&#8217;s internal delete routine initially expected the logic about what a handler function had to do, if anything, to come from the handler function itself. In fact what it needed to do was to first deduce if a handler was optimal for a particular type of data at all. The activity data made this clear, when there was suddenly a need to delete hundreds or thousands of individual pieces of data which were designed to be stored in huge quantity over a long period of time (unlike with news management, for example). Pushing the handler logic up into LiveWhale&#8217;s delete routine made it no longer necessary to perform logic a hundred or thousand times when the result was always going to be the same, and a one-off deletion procedure could alternatively be used for the bulk data.</p>
<p>This drives home the point that building something requires either the proper foresight to know how that system has to conform to conditions that haven&#8217;t yet come about, or ensuring that the foundation you&#8217;ve already built adjusts to appropriately handle new features as you add them. Fortunately, our LiveWhale development process utilizes a variety of monitoring tools and diagnostic tests which inspect the system closely to continually perform a sanity check on the results of code execution over the product&#8217;s development lifetime. This was a case where the system noticed the deletion flaw even before I did.</p>
]]></content:encoded>
			<wfw:commentRss>http://chapter42.whitewhale.net/2008/11/24/coding-ahead-of-yourself/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

