<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Building Dependable code with Dependency Injection &#8211; Slides &amp; Source</title>
	<atom:link href="http://www.robfe.com/2008/09/building-dependable-code-with-di-slides-n-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robfe.com/2008/09/building-dependable-code-with-di-slides-n-source/</link>
	<description>A blog about coding by Rob Fonseca-Ensor</description>
	<lastBuildDate>Sat, 28 Jan 2012 15:51:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Doron</title>
		<link>http://www.robfe.com/2008/09/building-dependable-code-with-di-slides-n-source/comment-page-1/#comment-23</link>
		<dc:creator>Doron</dc:creator>
		<pubDate>Thu, 11 Sep 2008 12:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.robfe.com/?p=47#comment-23</guid>
		<description>@Rob &amp; Rob,

if you feel DI/IOC for the testability is making you feel your code is hard to maintain, you could use a testability framework that eliminates the need for external dependencies. 

With Typemock you can facilitate unit testing by eliminating dependencies by mocking, even if your dependency is on non-interface types, internal object creation etc. 

This really isn&#039;t supposed to be a sales pitch but you&#039;re invited to visit our blog and website to learn more.</description>
		<content:encoded><![CDATA[<p>@Rob &amp; Rob,</p>
<p>if you feel DI/IOC for the testability is making you feel your code is hard to maintain, you could use a testability framework that eliminates the need for external dependencies. </p>
<p>With Typemock you can facilitate unit testing by eliminating dependencies by mocking, even if your dependency is on non-interface types, internal object creation etc. </p>
<p>This really isn&#8217;t supposed to be a sales pitch but you&#8217;re invited to visit our blog and website to learn more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.robfe.com/2008/09/building-dependable-code-with-di-slides-n-source/comment-page-1/#comment-13</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 02 Sep 2008 02:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.robfe.com/?p=47#comment-13</guid>
		<description>@Rob Engberg:

Hope it&#039;s ok to post the resuls of our IRL conversation, i wanted to post my reply online in case anyone else is looking for the same answers:

If you use IOC (passing dependencies through the constructor), then testing becomes easy, but the production system looks a bit messy because everytime you need an X, you have to create a Y and a Z. This code gets duplicated everywhere you need to use one of your nicely tested objects. Yuk! You say it breaks the encapsulation OO rule, I say it breaks the &quot;Single Responsibility Principle&quot; and &quot;Dont Repeat Yourself&quot; too! 

Yes: Factories are a great way to mostly solve these three problems. But I definately prefer using a Dependency Injection container. I have heard them referred to as &quot;factories on steriods&quot;. They are actually &lt;em&gt;much &lt;/em&gt;easier to use, as well as being more powerful. 

Hope you got a chance to read the article by James Kovacs (http://msdn.microsoft.com/en-us/magazine/cc337885.aspx) - it explains this stuff pretty well!

Cheers - Rob</description>
		<content:encoded><![CDATA[<p>@Rob Engberg:</p>
<p>Hope it&#8217;s ok to post the resuls of our IRL conversation, i wanted to post my reply online in case anyone else is looking for the same answers:</p>
<p>If you use IOC (passing dependencies through the constructor), then testing becomes easy, but the production system looks a bit messy because everytime you need an X, you have to create a Y and a Z. This code gets duplicated everywhere you need to use one of your nicely tested objects. Yuk! You say it breaks the encapsulation OO rule, I say it breaks the &#8220;Single Responsibility Principle&#8221; and &#8220;Dont Repeat Yourself&#8221; too! </p>
<p>Yes: Factories are a great way to mostly solve these three problems. But I definately prefer using a Dependency Injection container. I have heard them referred to as &#8220;factories on steriods&#8221;. They are actually <em>much </em>easier to use, as well as being more powerful. </p>
<p>Hope you got a chance to read the article by James Kovacs (<a href="http://msdn.microsoft.com/en-us/magazine/cc337885.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/magazine/cc337885.aspx</a>) &#8211; it explains this stuff pretty well!</p>
<p>Cheers &#8211; Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harshal</title>
		<link>http://www.robfe.com/2008/09/building-dependable-code-with-di-slides-n-source/comment-page-1/#comment-12</link>
		<dc:creator>Harshal</dc:creator>
		<pubDate>Mon, 01 Sep 2008 23:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.robfe.com/?p=47#comment-12</guid>
		<description>Thanks Rob.  I couldn&#039;t make it to the code camp but I&#039;ll take a look at this.</description>
		<content:encoded><![CDATA[<p>Thanks Rob.  I couldn&#8217;t make it to the code camp but I&#8217;ll take a look at this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Engberg</title>
		<link>http://www.robfe.com/2008/09/building-dependable-code-with-di-slides-n-source/comment-page-1/#comment-11</link>
		<dc:creator>Rob Engberg</dc:creator>
		<pubDate>Mon, 01 Sep 2008 22:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.robfe.com/?p=47#comment-11</guid>
		<description>Hey Rob, 
Great presentation at code camp.  Good job getting the slides up so quick.  

Just one comment on your Q&amp;A - there was a guy there who was asking you about DI breaking encapsulation.  I happen to agree with him:  Getting stuck having to expand some long lost project&#039;s code that uses a lot of DI leaves you with a scavenger hunt to round up or reinvent all the right dependencies to feed the constructors.  Fortunately, even if you haven&#039;t completely embraced a DI framework, another easy answer is Factories.  They can encapsulate the DI when you don&#039;t want the consumers of your classes to have to be responsible for the dependencies.</description>
		<content:encoded><![CDATA[<p>Hey Rob,<br />
Great presentation at code camp.  Good job getting the slides up so quick.  </p>
<p>Just one comment on your Q&amp;A &#8211; there was a guy there who was asking you about DI breaking encapsulation.  I happen to agree with him:  Getting stuck having to expand some long lost project&#8217;s code that uses a lot of DI leaves you with a scavenger hunt to round up or reinvent all the right dependencies to feed the constructors.  Fortunately, even if you haven&#8217;t completely embraced a DI framework, another easy answer is Factories.  They can encapsulate the DI when you don&#8217;t want the consumers of your classes to have to be responsible for the dependencies.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

