<?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: Just say no to &#8216;Poor Man’s Dependency Injection’.</title>
	<atom:link href="http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/</link>
	<description>Software development, testing, and techie life</description>
	<lastBuildDate>Thu, 08 Mar 2012 22:19: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: Mark Nijhof</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1045</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Wed, 05 Aug 2009 16:58:18 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1045</guid>
		<description>A bit late to the game I know, but if you are not allowed to use an oss project to get yourself an IoC. Then instead of using the PMDI I think I would go for something like Func from Kzu. Not that one because that is probably also not allowed, but it is relatively easy to recreate that idea and you get a static IoC. You still have to wire it up yourself but switching to an actual IoC is easy, and all new() are concentrated in one place, the configuration of your own Func implementation.

-Mark</description>
		<content:encoded><![CDATA[<p>A bit late to the game I know, but if you are not allowed to use an oss project to get yourself an IoC. Then instead of using the PMDI I think I would go for something like Func from Kzu. Not that one because that is probably also not allowed, but it is relatively easy to recreate that idea and you get a static IoC. You still have to wire it up yourself but switching to an actual IoC is easy, and all new() are concentrated in one place, the configuration of your own Func implementation.</p>
<p>-Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1044</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sat, 25 Jul 2009 17:24:02 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1044</guid>
		<description>We are pretty new to IoC and it makes sense to us.  I am doing my best to spread the work in our shop.  For my claifification to your item #1, would also replacing our Factory.CreateWidget() also be good areas to *look at* swaping in the ObjectFactory.GetInstance&lt;Widget&gt;()?

You&#039;d think our code was written during the industrial revolution with all the factories in there... oh wait it was because we have a lot of iSeries integration :&#124;</description>
		<content:encoded><![CDATA[<p>We are pretty new to IoC and it makes sense to us.  I am doing my best to spread the work in our shop.  For my claifification to your item #1, would also replacing our Factory.CreateWidget() also be good areas to *look at* swaping in the ObjectFactory.GetInstance<widget>()?</p>
<p>You&#8217;d think our code was written during the industrial revolution with all the factories in there&#8230; oh wait it was because we have a lot of iSeries integration :|</widget></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1043</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 16 Jul 2009 19:06:53 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1043</guid>
		<description>Brian,

Without going into too many details, some industries have very strict guidelines about using Open Source projects, I happen to do 90% of my work for a company within one such industry.  

To just get permission use Log4Net for example we had to have a team of lawyers pour over documents written by my department with justifications for using it, plus they had their own people analyze the code.  I&#039;ve been working with this company for eight months but the process started months before I even got here, and we just got permission about a month ago to use it.

This is for simple logging, getting something like an IoC or ORM approved will take even longer (something I am already working on doing).  There&#039;s nothing preventing us from using DI (maybe I wasn&#039;t clear on that originally), just using an OSS IoC Container, which is why I am on the &quot;pro&quot; PMDI side.</description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>Without going into too many details, some industries have very strict guidelines about using Open Source projects, I happen to do 90% of my work for a company within one such industry.  </p>
<p>To just get permission use Log4Net for example we had to have a team of lawyers pour over documents written by my department with justifications for using it, plus they had their own people analyze the code.  I&#8217;ve been working with this company for eight months but the process started months before I even got here, and we just got permission about a month ago to use it.</p>
<p>This is for simple logging, getting something like an IoC or ORM approved will take even longer (something I am already working on doing).  There&#8217;s nothing preventing us from using DI (maybe I wasn&#8217;t clear on that originally), just using an OSS IoC Container, which is why I am on the &#8220;pro&#8221; PMDI side.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Vallelunga</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1042</link>
		<dc:creator>Brian Vallelunga</dc:creator>
		<pubDate>Wed, 15 Jul 2009 14:22:49 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1042</guid>
		<description>What sorts of legal/managerial concerns are there that people here can&#039;t use DI? To me that&#039;s like saying I can&#039;t use IDisposable or generics (I&#039;m ignoring .NET 1.1 apps here).

If it&#039;s an open source issue, can&#039;t you just use Unity? It&#039;s from Microsoft after all. And there&#039;s always the fact that most developers could write a bare-bones DI framework in a couple of days. I&#039;m never going back to pre-DI programming again.</description>
		<content:encoded><![CDATA[<p>What sorts of legal/managerial concerns are there that people here can&#8217;t use DI? To me that&#8217;s like saying I can&#8217;t use IDisposable or generics (I&#8217;m ignoring .NET 1.1 apps here).</p>
<p>If it&#8217;s an open source issue, can&#8217;t you just use Unity? It&#8217;s from Microsoft after all. And there&#8217;s always the fact that most developers could write a bare-bones DI framework in a couple of days. I&#8217;m never going back to pre-DI programming again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chadmyers</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1041</link>
		<dc:creator>chadmyers</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:46:56 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1041</guid>
		<description>@Andrew: I didn&#039;t label you as unexperienced. I just said that if you haven&#039;t experienced the friction of PDMI, you might not have used IoC long enough to understand why PDMI causes a lot of friction.

Friction is relative, of course. If you maintain 10,000 stored procedures, the friction of changing 250 c&#039;tors every time you add a new dependency is relatively frictionless compared to the stored procs.

Your arguing exception cases with PMDI. Sure, if someone&#039;s already gotten themselves into the hole and they don&#039;t change the code that often, then the friction of PMDI is nil for now. Should any significant change come along later, it will blow away any small productivity gains that may have been made by using PMDI first instead of a container.

PMDI is a landmine waiting to explode.  It&#039;s possible you may avoid ever stepping on it, but it doesn&#039;t make it any less dangerous to future productivity.</description>
		<content:encoded><![CDATA[<p>@Andrew: I didn&#8217;t label you as unexperienced. I just said that if you haven&#8217;t experienced the friction of PDMI, you might not have used IoC long enough to understand why PDMI causes a lot of friction.</p>
<p>Friction is relative, of course. If you maintain 10,000 stored procedures, the friction of changing 250 c&#8217;tors every time you add a new dependency is relatively frictionless compared to the stored procs.</p>
<p>Your arguing exception cases with PMDI. Sure, if someone&#8217;s already gotten themselves into the hole and they don&#8217;t change the code that often, then the friction of PMDI is nil for now. Should any significant change come along later, it will blow away any small productivity gains that may have been made by using PMDI first instead of a container.</p>
<p>PMDI is a landmine waiting to explode.  It&#8217;s possible you may avoid ever stepping on it, but it doesn&#8217;t make it any less dangerous to future productivity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1040</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:36:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1040</guid>
		<description>My point is this, and feel free to delete it if you want.  You can&#039;t just generalize about all projects and say that eventually PMDI will result in too much friction (like you did in your other post).  Because it&#039;s simply not true.  At certain parts of a projects life cycle, there just isn&#039;t a need to change the constructor that much, and if there is, you are likely over thinking the problem.

Of course, it always could (and does) happen, you could get a request to make change that radically changes some of your pre-existing code, when that happens just change it.  That is what Resharper is for, but more often than not, changes are small and will never require a constructor change.

Also, I have no idea where you got it from that you can&#039;t speak from experience, I come to this website for that very reason, but at the same time, you can&#039;t just label everyone who disagrees with you as unexperienced.  That is what I had issue with. 

FWIW, I actually never disagreed with you, I think IoCs are great (and even stated that I use StructureMap on personal projects, and have even used FubuMVC quite extensively on a test project for a client before we switched to RoR), but I also think PMDI will also do a a pinch when needed.</description>
		<content:encoded><![CDATA[<p>My point is this, and feel free to delete it if you want.  You can&#8217;t just generalize about all projects and say that eventually PMDI will result in too much friction (like you did in your other post).  Because it&#8217;s simply not true.  At certain parts of a projects life cycle, there just isn&#8217;t a need to change the constructor that much, and if there is, you are likely over thinking the problem.</p>
<p>Of course, it always could (and does) happen, you could get a request to make change that radically changes some of your pre-existing code, when that happens just change it.  That is what Resharper is for, but more often than not, changes are small and will never require a constructor change.</p>
<p>Also, I have no idea where you got it from that you can&#8217;t speak from experience, I come to this website for that very reason, but at the same time, you can&#8217;t just label everyone who disagrees with you as unexperienced.  That is what I had issue with. </p>
<p>FWIW, I actually never disagreed with you, I think IoCs are great (and even stated that I use StructureMap on personal projects, and have even used FubuMVC quite extensively on a test project for a client before we switched to RoR), but I also think PMDI will also do a a pinch when needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chadmyers</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1039</link>
		<dc:creator>chadmyers</dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:19:30 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1039</guid>
		<description>@Andrew: I deleted your last comment because it&#039;s just full of nonsense and it&#039;s completely irrelevant to anything. If you want to personally bash me for some silly selfish reason, please go do it on your own blog.

If you have a salient point to make, please make it. Until then, your only argument is that I&#039;m somehow too arrogant to speak truth about my experience in this matter.  Fine, point taken. Thank you.

</description>
		<content:encoded><![CDATA[<p>@Andrew: I deleted your last comment because it&#8217;s just full of nonsense and it&#8217;s completely irrelevant to anything. If you want to personally bash me for some silly selfish reason, please go do it on your own blog.</p>
<p>If you have a salient point to make, please make it. Until then, your only argument is that I&#8217;m somehow too arrogant to speak truth about my experience in this matter.  Fine, point taken. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chadmyers</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1038</link>
		<dc:creator>chadmyers</dc:creator>
		<pubDate>Tue, 14 Jul 2009 19:33:35 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1038</guid>
		<description>@Andrew: If you haven&#039;t experienced the friction of PDMI, it&#039;s more likely you&#039;re simply not aware of it as you probably don&#039;t know how frictionless full IoC container usage can be.  I was the same way until I gained a few levels in IoC container usage.

&#039;biased&#039;?  By biased you mean &#039;experienced&#039;?  I *hired* the guy who wrote StructureMap so that, among many other and more important reasons, our IoC usage would be the best it could possibly be.  

In the process of this project, Jeremy has added many new and exciting features to StructureMap and raised the state of the art considerably.  I fail to see how this is, in any way, a negative.

I don&#039;t understand what FubuMVC has to do with any of this. Now you&#039;re just throwing sand in people&#039;s eyes.</description>
		<content:encoded><![CDATA[<p>@Andrew: If you haven&#8217;t experienced the friction of PDMI, it&#8217;s more likely you&#8217;re simply not aware of it as you probably don&#8217;t know how frictionless full IoC container usage can be.  I was the same way until I gained a few levels in IoC container usage.</p>
<p>&#8216;biased&#8217;?  By biased you mean &#8216;experienced&#8217;?  I *hired* the guy who wrote StructureMap so that, among many other and more important reasons, our IoC usage would be the best it could possibly be.  </p>
<p>In the process of this project, Jeremy has added many new and exciting features to StructureMap and raised the state of the art considerably.  I fail to see how this is, in any way, a negative.</p>
<p>I don&#8217;t understand what FubuMVC has to do with any of this. Now you&#8217;re just throwing sand in people&#8217;s eyes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1037</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 14 Jul 2009 19:04:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1037</guid>
		<description>Unfortunately, as Tyler mentioned, Managerial Ignorance is not always the reason why IoC containers are not used.  At my company its mainly a legal and regulatory issue.

In a few posts you&#039;ve mentioned friction with PMDI, maybe it&#039;s because I&#039;ve only really used it on legacy apps (all built in 1.1), but I just haven&#039;t encountered any...at least not to the degree that you insist it will occur.

I&#039;m not saying don&#039;t use an IoC container (I use StructureMap on my own projects), but the reality is, I don&#039;t always have that option so I&#039;ll take Poor Man&#039;s over nothing.

Also, as a matter of full disclosure, don&#039;t you think you are a little biased about this issue?  Don&#039;t you work for the guy who wrote Structure Map?  At the very least, you partnered with him to write FubuMVC, which in a way &quot;competes&quot; with ASP.NET MVC. </description>
		<content:encoded><![CDATA[<p>Unfortunately, as Tyler mentioned, Managerial Ignorance is not always the reason why IoC containers are not used.  At my company its mainly a legal and regulatory issue.</p>
<p>In a few posts you&#8217;ve mentioned friction with PMDI, maybe it&#8217;s because I&#8217;ve only really used it on legacy apps (all built in 1.1), but I just haven&#8217;t encountered any&#8230;at least not to the degree that you insist it will occur.</p>
<p>I&#8217;m not saying don&#8217;t use an IoC container (I use StructureMap on my own projects), but the reality is, I don&#8217;t always have that option so I&#8217;ll take Poor Man&#8217;s over nothing.</p>
<p>Also, as a matter of full disclosure, don&#8217;t you think you are a little biased about this issue?  Don&#8217;t you work for the guy who wrote Structure Map?  At the very least, you partnered with him to write FubuMVC, which in a way &#8220;competes&#8221; with ASP.NET MVC. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chadmyers</title>
		<link>http://lostechies.com/chadmyers/2009/07/14/just-say-no-to-poor-man-s-dependency-injection/#comment-1036</link>
		<dc:creator>chadmyers</dc:creator>
		<pubDate>Tue, 14 Jul 2009 18:29:56 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chad_myers/archive/2009/07/14/just-say-no-to-poor-man-s-dependency-injection.aspx#comment-1036</guid>
		<description>@Kelly:

I disagree. I have found that IoC is good all but the smallest of applications (i.e. one-CS-file projects).  I usually start out thinking that IoC is overkill here and before long, I end up having to incorporate it anyhow at greater cost than if I had just started out that way.   I do not agree with the premise that &quot;for many apps IoC is overkill.&quot;  I&#039;d say that the exception is no-IOC, and IOC should be the norm unless there are other constraints.

PMDI will always result in maintenance headache and friction in the end.  PMDI is write-one, fix repeatedly.

&quot;Where IoC is the better choice&quot;, well, it&#039;s *always* better than PDMI.  It&#039;s *usually* better than no-DI-at-all.</description>
		<content:encoded><![CDATA[<p>@Kelly:</p>
<p>I disagree. I have found that IoC is good all but the smallest of applications (i.e. one-CS-file projects).  I usually start out thinking that IoC is overkill here and before long, I end up having to incorporate it anyhow at greater cost than if I had just started out that way.   I do not agree with the premise that &#8220;for many apps IoC is overkill.&#8221;  I&#8217;d say that the exception is no-IOC, and IOC should be the norm unless there are other constraints.</p>
<p>PMDI will always result in maintenance headache and friction in the end.  PMDI is write-one, fix repeatedly.</p>
<p>&#8220;Where IoC is the better choice&#8221;, well, it&#8217;s *always* better than PDMI.  It&#8217;s *usually* better than no-DI-at-all.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
