<?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>Dan Merino&#039;s Blog &#187; IoC</title>
	<atom:link href="http://blog.danmerino.com/tag/ioc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.danmerino.com</link>
	<description>Computer Science, Entrepreneurship and Productivity</description>
	<lastBuildDate>Wed, 21 Dec 2011 06:34:01 +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>Unitiy IOC</title>
		<link>http://blog.danmerino.com/unitiy-ioc/</link>
		<comments>http://blog.danmerino.com/unitiy-ioc/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 16:37:21 +0000</pubDate>
		<dc:creator>danmerino</dc:creator>
				<category><![CDATA[Best practice]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Inversion of Control]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://blog.codingadventure.com/?p=138</guid>
		<description><![CDATA[Tweet Basically, with Unity, I ended up writing something like this (simplified version) : Unity turned out to work very well. I was able to save a lot of lines of code and it is greatly improving the testability of &#8230; <a href="http://blog.danmerino.com/unitiy-ioc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.danmerino.com%2Funitiy-ioc%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.danmerino.com/unitiy-ioc/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.danmerino.com/unitiy-ioc/"  data-text="Unitiy IOC" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://blog.danmerino.com/unitiy-ioc/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://blog.danmerino.com/unitiy-ioc/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>Basically, with <a title="Unitiy" href="http://www.codeplex.com/unity/">Unity</a>, I ended up writing something like this (simplified version) :</p>
<pre class="brush: csharp; title: ; notranslate">IUnityContainer container = new UnityContainer();

container.RegisterType&lt;IRiskRepository, RiskRepository&gt;();

string conn = ConfigurationManager.ConnectionStrings[&quot;ConnectionString&quot;].ConnectionString;

container.Configure&lt;InjectedMembers&gt;().ConfigureInjectionFor&lt;RiskRepository&gt;(new InjectionConstructor(conn));

UnityControllerFactory factory = new UnityControllerFactory(container);

ControllerBuilder.Current.SetControllerFactory(factory);
</pre>
<p><strong><em>Unity turned out to work very well. I was able to save a lot of lines of code and it is greatly improving the testability of the dynamic modules I am using on the mock project architecture. Also, it was easy to set up. Its a good alternative to the other more popular IOC.<br />
</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danmerino.com/unitiy-ioc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Inversion of Control</title>
		<link>http://blog.danmerino.com/inversion-of-control/</link>
		<comments>http://blog.danmerino.com/inversion-of-control/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 00:16:21 +0000</pubDate>
		<dc:creator>danmerino</dc:creator>
				<category><![CDATA[Inversion of Control]]></category>
		<category><![CDATA[inversion of control]]></category>
		<category><![CDATA[IoC]]></category>

		<guid isPermaLink="false">http://blog.codingadventure.com/?p=127</guid>
		<description><![CDATA[Tweet If you are building an application that has a lot of modules and those modules can be plugged in dynamically then you will probably want to use inversion of control (IoC). What can inversion of control do for you? &#8230; <a href="http://blog.danmerino.com/inversion-of-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.danmerino.com%2Finversion-of-control%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://blog.danmerino.com/inversion-of-control/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.danmerino.com/inversion-of-control/"  data-text="Inversion of Control" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://blog.danmerino.com/inversion-of-control/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://blog.danmerino.com/inversion-of-control/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>If you are building an application that has a lot of modules and those modules can be plugged in dynamically then you will probably want to use <em><strong>inversion of control</strong></em> (IoC).</p>
<p>What can inversion of control do for you?<a href="http://en.wikipedia.org/wiki/Elevator_pitch"></a></p>
<blockquote>
<ul>
<li>help you deal with the configuration of all the modules</li>
<li>a one &#8220;single point change&#8221; so you wont have to hunt down every other place where things could go wrong</li>
<li>help with transparency as you just have to use a module and not worry how it is implemented</li>
<li>provide a nice way to have strong contracts (due to interfaces)</li>
<li>finally, the application can change it&#8217;s own behavior when it believes it is necessary at runtime</li>
</ul>
</blockquote>
<p>If you want to learn more I would recommend reading the the famous <a href="http://www.martinfowler.com/articles/injection.html">article</a> written by Martin Fowler.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danmerino.com/inversion-of-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

