<?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>John Bennett&#039;s blog &#187; configuration</title>
	<atom:link href="http://jtbennett.com/blog/tag/configuration/feed" rel="self" type="application/rss+xml" />
	<link>http://jtbennett.com/blog</link>
	<description>Software and web development</description>
	<lastBuildDate>Tue, 08 Feb 2011 00:50:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>On Configuration</title>
		<link>http://jtbennett.com/blog/2009/04/on-configuration</link>
		<comments>http://jtbennett.com/blog/2009/04/on-configuration#comments</comments>
		<pubDate>Sat, 11 Apr 2009 16:16:00 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[operations]]></category>

		<guid isPermaLink="false">http://173.203.71.169/blog/2009/04/on-configuration/</guid>
		<description><![CDATA[[I recently wrote this up for work, and thought it was worth re-posting here.] These ideas come almost entirely from Udi Dahan and how he implemented nServiceBus, but unfortunately I can&#8217;t find where he said it.&#160; It may have been &#8230; <a href="http://jtbennett.com/blog/2009/04/on-configuration">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>[I recently wrote this up for work, and thought it was worth re-posting here.]</p>
<p>These ideas come almost entirely from <a href="http://www.udidahan.com/?blog=true">Udi Dahan</a> and how he implemented nServiceBus, but unfortunately I can&#8217;t find where he said it.&nbsp; It may have been when I attended his class in Austin last October.</p>
<p>I define configuration as &#8220;stuff that needs to be easy to change.&#8221;&nbsp; Udi says there are two major categories of configuration, with very different characteristics.&nbsp; One category has to do with operational concerns, such as:</p>
<ul>
<li>The specifics of the physical deployment environment (URLs, machine names, connection strings, etc.)
<li>Monitoring and troubleshooting (logging verbosity and where log entries are stored, etc.)
<li>Scaling out (how many app instances or threads should be running, etc.) </li>
</ul>
<p>These are things that administrators care about deeply.&nbsp; They want to be able to move things to different machines, spin up a new instance of your service, failover a database server, etc. And as a developer, you want them to be able to do all of those things without calling you.&nbsp; <img src='http://jtbennett.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &nbsp; These &#8220;administrator config&#8221; settings <strong>have no effect on the semantics of your application</strong>.&nbsp; They change &#8220;physical&#8221; characteristics, not business-logical characteristics.</p>
<p>A second category of configuration does affect the semantics of your application.&nbsp; Udi calls this &#8220;developer config.&#8221;&nbsp; Changing it <strong>will </strong>have an effect on what the application does.&nbsp; These are things like:</p>
<ul>
<li>Using a different implementation of a interface (e.g., a gateway that talks to a database vs a remote web service)
<li>Whether a particular operation requires a transaction (e.g., the WCF settings for a specific service) </li>
</ul>
<p>Changes to these often need to be one-line-of-code simple, which makes them &#8220;configuration&#8221; in my mind.&nbsp; But they also imply a requirement change because they change how the application works.&nbsp; (Yes, adding or removing a transaction is a semantic change.)&nbsp; Therefore you definitely don&#8217;t want administrators to go and change them on production servers.&nbsp; The best way to prevent them from changing these settings it to give them no way to do it!</p>
<p>The most common objection to putting the developer config in code is that you have to redeploy your application.&nbsp; Yep, exactly.&nbsp; Changing developer config alters the semantics of your application.&nbsp; Any such change should go through all of your testing and validation processes before being released.</p>
<p>Digging a little deeper, a lot of the resistance to putting developer config in code stems from fear of deployment.&nbsp; If deployment is hard, error-prone, and stressful then you try to avoid it by putting as many things in your config file as possible.&nbsp; (The same rationale is often given for putting business logic in stored procedures.)&nbsp; <strong>If you cross your fingers every time you deploy, you&#8217;re doing it wrong.</strong>&nbsp; </p>
<p>Deployments (and rollbacks) should be easy and reliable.&nbsp; That means largely automated.&nbsp; Once you have automated builds, lots of automated tests, and (mostly) automated deployment/rollback, &#8220;hard coded&#8221; is no longer a scary concept.&nbsp; See <a href="http://ayende.com/Blog/archive/2008/08/21/Enabling-change-by-hard-coding-everything.aspx">this</a> and <a href="http://ayende.com/Blog/archive/2008/08/21/Enabling-change-by-hard-coding-everything-the-smart-way.aspx">this</a>. JFHCI. <img src='http://jtbennett.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ever opened up a config file that looked really scary?&nbsp; How about a default WCF config with dozens and dozens of settings for a single service endpoint?&nbsp; How many of those things do you really want someone to change on the production servers?&nbsp; 5% of them?&nbsp; Once you&#8217;ve removed all of that developer config, the administrators will thank you for removing all that noise you told them to absolutely, positively never touch.&nbsp; They&#8217;re also a lot less likely to catastrophically fat-finger a random character that will be lost in a sea of angle brackets.</p>
]]></content:encoded>
			<wfw:commentRss>http://jtbennett.com/blog/2009/04/on-configuration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

