<?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: PTOM – Brownfield development – Making your dependencies explicit</title>
	<atom:link href="http://lostechies.com/gabrielschenker/2009/05/04/ptom-brownfield-development-making-your-dependencies-explicit/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/gabrielschenker/2009/05/04/ptom-brownfield-development-making-your-dependencies-explicit/</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: rtpHarry</title>
		<link>http://lostechies.com/gabrielschenker/2009/05/04/ptom-brownfield-development-making-your-dependencies-explicit/#comment-144</link>
		<dc:creator>rtpHarry</dc:creator>
		<pubDate>Sat, 05 Dec 2009 01:20:39 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/05/05/ptom-brownfield-development-making-your-dependencies-explicit.aspx#comment-144</guid>
		<description>Hey, I enjoyed reading this post. I think I read it back when it was originally posted as well. It discusses some advanced topics in a nice way - by explaining them clearly and not getting tied up in all the associated topics such as what SOLID is etc.


I noticed a few typos while I was reading them which I will paste below because I cannot see a way to contact you via PM:

“An implicit dependency of a give class is a dependency that is not discoverable from the outside of this class. The corresponding dependency is never appearing in the contract (or interface) of the class.”

give should be given




Since we are extending an existing application and since we cannot modify the whole code base at once we need to be able to use our modified component the same way as we did before the change was introduced. Probably the OrderSerivce class is used at various points in the legacy code base in the following way

OrderSerivce should be OrderService



Well, there is a simple solution – this solution is also called “poor man’s dependency injection. We can implement a default constructor in the class and just forward the call to the other constructor. 

“poor man’s dependency injection is missing closing &quot;





Not the class is responsible to acquire its dependencies but those dependencies are injected from “outside”.

Not the class is responsible doesn&#039;t make sense.</description>
		<content:encoded><![CDATA[<p>Hey, I enjoyed reading this post. I think I read it back when it was originally posted as well. It discusses some advanced topics in a nice way &#8211; by explaining them clearly and not getting tied up in all the associated topics such as what SOLID is etc.</p>
<p>I noticed a few typos while I was reading them which I will paste below because I cannot see a way to contact you via PM:</p>
<p>“An implicit dependency of a give class is a dependency that is not discoverable from the outside of this class. The corresponding dependency is never appearing in the contract (or interface) of the class.”</p>
<p>give should be given</p>
<p>Since we are extending an existing application and since we cannot modify the whole code base at once we need to be able to use our modified component the same way as we did before the change was introduced. Probably the OrderSerivce class is used at various points in the legacy code base in the following way</p>
<p>OrderSerivce should be OrderService</p>
<p>Well, there is a simple solution – this solution is also called “poor man’s dependency injection. We can implement a default constructor in the class and just forward the call to the other constructor. </p>
<p>“poor man’s dependency injection is missing closing &#8221;</p>
<p>Not the class is responsible to acquire its dependencies but those dependencies are injected from “outside”.</p>
<p>Not the class is responsible doesn&#8217;t make sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Martin</title>
		<link>http://lostechies.com/gabrielschenker/2009/05/04/ptom-brownfield-development-making-your-dependencies-explicit/#comment-143</link>
		<dc:creator>Jim Martin</dc:creator>
		<pubDate>Sat, 09 May 2009 17:30:35 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/05/05/ptom-brownfield-development-making-your-dependencies-explicit.aspx#comment-143</guid>
		<description>Nicely done!  I really like how you explained DI as it relates to brownfield projects.</description>
		<content:encoded><![CDATA[<p>Nicely done!  I really like how you explained DI as it relates to brownfield projects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Think before coding</title>
		<link>http://lostechies.com/gabrielschenker/2009/05/04/ptom-brownfield-development-making-your-dependencies-explicit/#comment-142</link>
		<dc:creator>Think before coding</dc:creator>
		<pubDate>Tue, 05 May 2009 08:41:13 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/05/05/ptom-brownfield-development-making-your-dependencies-explicit.aspx#comment-142</guid>
		<description>Good advice for DI new comers.
I would just add that when putting interfaces in front of existing framework parts, you don&#039;t have to mimic framework methods exactly...
For instance, you can create a IConfiguration interface that provide properties for each app setting (this way you can get rid of magic strings, and you don&#039;t have to know if the settings are in the app.config file or elsewhere).</description>
		<content:encoded><![CDATA[<p>Good advice for DI new comers.<br />
I would just add that when putting interfaces in front of existing framework parts, you don&#8217;t have to mimic framework methods exactly&#8230;<br />
For instance, you can create a IConfiguration interface that provide properties for each app setting (this way you can get rid of magic strings, and you don&#8217;t have to know if the settings are in the app.config file or elsewhere).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anne Epstein</title>
		<link>http://lostechies.com/gabrielschenker/2009/05/04/ptom-brownfield-development-making-your-dependencies-explicit/#comment-141</link>
		<dc:creator>Anne Epstein</dc:creator>
		<pubDate>Tue, 05 May 2009 04:56:23 +0000</pubDate>
		<guid isPermaLink="false">/blogs/gabrielschenker/archive/2009/05/05/ptom-brownfield-development-making-your-dependencies-explicit.aspx#comment-141</guid>
		<description>Excellent article, Gabriel!  I particularly like the idea of making the default constructor a factory method as a stopgap. It&#039;s a great way of picking apart dependencies NOW without worrying about having to make risky changes that could cascade over the whole app.  That sort of worry often prevents any improvements at all-so, small, low-risk steps like this illustrates are SO important.

 I&#039;m really looking forward to the rest of this series!</description>
		<content:encoded><![CDATA[<p>Excellent article, Gabriel!  I particularly like the idea of making the default constructor a factory method as a stopgap. It&#8217;s a great way of picking apart dependencies NOW without worrying about having to make risky changes that could cascade over the whole app.  That sort of worry often prevents any improvements at all-so, small, low-risk steps like this illustrates are SO important.</p>
<p> I&#8217;m really looking forward to the rest of this series!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
