<?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: The Dependency Inversion Principle</title>
	<atom:link href="http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/</link>
	<description>Blog about architectural patterns, best practices, coding principles and techniques</description>
	<lastBuildDate>Wed, 22 May 2013 12:15:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Keshav Baweja</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-529</link>
		<dc:creator>Keshav Baweja</dc:creator>
		<pubDate>Thu, 16 Aug 2012 04:47:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-529</guid>
		<description>Hi, the blog is easy to read but is a copy of Robert Martin&#039;s post on Object Mentor.  </description>
		<content:encoded><![CDATA[<p>Hi, the blog is easy to read but is a copy of Robert Martin&#8217;s post on Object Mentor.  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: recepd</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-55</link>
		<dc:creator>recepd</dc:creator>
		<pubDate>Tue, 14 Dec 2010 11:50:44 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-55</guid>
		<description>Greate article about dependency..

Thanks.</description>
		<content:encoded><![CDATA[<p>Greate article about dependency..</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-54</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Mon, 04 Oct 2010 18:34:08 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-54</guid>
		<description>The part of your example that confuses me is that I don&#039;t think the EncryptionService class should even be concerned about reading or writing to/from streams.  Wouldn&#039;t you say that the whole problem would go away if you followed the Single Responsibility Principle and exposed the private method as public?  Now the service would be as mobile as possible

I feel like this weakens your example as a whole.</description>
		<content:encoded><![CDATA[<p>The part of your example that confuses me is that I don&#8217;t think the EncryptionService class should even be concerned about reading or writing to/from streams.  Wouldn&#8217;t you say that the whole problem would go away if you followed the Single Responsibility Principle and exposed the private method as public?  Now the service would be as mobile as possible</p>
<p>I feel like this weakens your example as a whole.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel N. Schenker</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-53</link>
		<dc:creator>Gabriel N. Schenker</dc:creator>
		<pubDate>Fri, 01 Oct 2010 17:20:37 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-53</guid>
		<description>@Netizen: you are using strong words here! You are accusing me of not contributing own stuff but stealing from others and just put my name on it...
If that is your opinion then I have nothing to say any more and just let other readers decide. But if this was not your intention then pay attention what words you use when criticizing others contributions.
Not everybody can be an inventor. We also need engineers to make things usable in every days life. Whenever I copy things from other sources I tend to give cross references. If I forgot one then I am sorry for that. It was not by intent.</description>
		<content:encoded><![CDATA[<p>@Netizen: you are using strong words here! You are accusing me of not contributing own stuff but stealing from others and just put my name on it&#8230;<br />
If that is your opinion then I have nothing to say any more and just let other readers decide. But if this was not your intention then pay attention what words you use when criticizing others contributions.<br />
Not everybody can be an inventor. We also need engineers to make things usable in every days life. Whenever I copy things from other sources I tend to give cross references. If I forgot one then I am sorry for that. It was not by intent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Netizen</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-52</link>
		<dc:creator>Netizen</dc:creator>
		<pubDate>Wed, 22 Sep 2010 23:28:40 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-52</guid>
		<description>Gabriel plagiarized this from Robert Martin.  It&#039;s ok to include others writing as long as the original author is given due credit.  For example, the section &quot;Why call it dependency inversion?&quot; is copied literally word-for-word from Mr. Martin&#039;s article: http://www.objectmentor.com/resources/articles/dip.pdf</description>
		<content:encoded><![CDATA[<p>Gabriel plagiarized this from Robert Martin.  It&#8217;s ok to include others writing as long as the original author is given due credit.  For example, the section &#8220;Why call it dependency inversion?&#8221; is copied literally word-for-word from Mr. Martin&#8217;s article: <a href="http://www.objectmentor.com/resources/articles/dip.pdf" rel="nofollow">http://www.objectmentor.com/resources/articles/dip.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuan Li</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-51</link>
		<dc:creator>Chuan Li</dc:creator>
		<pubDate>Wed, 02 Dec 2009 13:44:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-51</guid>
		<description>Simple put, a compilation module, whether a class, a method, should know as little as outside scope as possible.

</description>
		<content:encoded><![CDATA[<p>Simple put, a compilation module, whether a class, a method, should know as little as outside scope as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yann Schwartz</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-50</link>
		<dc:creator>Yann Schwartz</dc:creator>
		<pubDate>Mon, 02 Feb 2009 21:41:41 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-50</guid>
		<description>@Ryan 

Oops. Sorry, I  had actually read &quot;Dependency Injection&quot; instead of &quot;Dependency inversion&quot;. So, agreed, this example shows dependency inversion, in a way (even if you could get away with it with using Stream instead of your own home-cooked interfaces). </description>
		<content:encoded><![CDATA[<p>@Ryan </p>
<p>Oops. Sorry, I  had actually read &#8220;Dependency Injection&#8221; instead of &#8220;Dependency inversion&#8221;. So, agreed, this example shows dependency inversion, in a way (even if you could get away with it with using Stream instead of your own home-cooked interfaces). </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Martin</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-49</link>
		<dc:creator>Ryan Martin</dc:creator>
		<pubDate>Mon, 02 Feb 2009 13:34:06 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-49</guid>
		<description>@Yann

I think he&#039;s trying to illustrate a point using familiar concepts.
You can argue the usefulness of the example as an implementation but I think he illustrates the usefulness of DI quite nicely.</description>
		<content:encoded><![CDATA[<p>@Yann</p>
<p>I think he&#8217;s trying to illustrate a point using familiar concepts.<br />
You can argue the usefulness of the example as an implementation but I think he illustrates the usefulness of DI quite nicely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yann Schwartz</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-48</link>
		<dc:creator>Yann Schwartz</dc:creator>
		<pubDate>Mon, 02 Feb 2009 08:55:05 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-48</guid>
		<description>Hello. While I agree DI is a good thing, your example is not really telling, since plain old polymorphism would do nicely here, like another commenter said : there is a nice abstraction of something meant to write or read bytes, it&#039;s called System.IO.Stream...</description>
		<content:encoded><![CDATA[<p>Hello. While I agree DI is a good thing, your example is not really telling, since plain old polymorphism would do nicely here, like another commenter said : there is a nice abstraction of something meant to write or read bytes, it&#8217;s called System.IO.Stream&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MrTea</title>
		<link>http://lostechies.com/gabrielschenker/2009/01/30/the-dependency-inversion-principle/#comment-47</link>
		<dc:creator>MrTea</dc:creator>
		<pubDate>Mon, 02 Feb 2009 08:10:43 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx#comment-47</guid>
		<description>@Kim

Personally I would favour di in all cases, apart from anything else it&#039;s more testable, and another key benefit is DI will make it easier for other developers to debug/work on your code.

Take an example where another developer comes in and needs to change your encryption mechanism, far better that they only have to focus on the encryption code itself than to have to wade through the unrelated logic to do with opening files etc.

If they do need to alter the file reading/writing part of the logic, again they can focus on just that (in isolation) and as long as it doesn&#039;t break the contract as defined by the interface, then everything should continue to work fine afterwards.</description>
		<content:encoded><![CDATA[<p>@Kim</p>
<p>Personally I would favour di in all cases, apart from anything else it&#8217;s more testable, and another key benefit is DI will make it easier for other developers to debug/work on your code.</p>
<p>Take an example where another developer comes in and needs to change your encryption mechanism, far better that they only have to focus on the encryption code itself than to have to wade through the unrelated logic to do with opening files etc.</p>
<p>If they do need to alter the file reading/writing part of the logic, again they can focus on just that (in isolation) and as long as it doesn&#8217;t break the contract as defined by the interface, then everything should continue to work fine afterwards.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
