<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.lostechies.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jimmy Bogard - All Comments</title><link>http://www.lostechies.com/blogs/jimmy_bogard/default.aspx</link><description>Professional driver on closed road.  Do not attempt.</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22628</link><pubDate>Fri, 03 Jul 2009 21:10:11 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22628</guid><dc:creator>Mike Chaliy</dc:creator><description>&lt;p&gt;We moved to the poor-man&amp;#39;s dependency injection from proper DI. And now I do not think that this is anti pattern(as I did before).&lt;/p&gt;
&lt;p&gt;Primmary reasons are:&lt;/p&gt;
&lt;p&gt;1) api usage is much more more netural... &lt;/p&gt;
&lt;p&gt;2) consumer control creation(or access) that means that u can be lazy, an object that you depends on are also could be lazy. you can force instantiation by factory methods.. thats still much more netural.&lt;/p&gt;
&lt;p&gt;3) you do not need materialize whole graph of dependecies... means instantiation of the controller could result to instantiation of the dep1 and dep2, but could just dep1.&lt;/p&gt;
&lt;p&gt;4) there is no configs (implict or explict)... thats cool!&lt;/p&gt;
&lt;p&gt;5) we are not forced to use procedure style code (services are plain bags of procedures), we can do proper OO. Composition now much more netural.&lt;/p&gt;
&lt;p&gt;6) Public contrustors are now constructors, they are not overloaded with all dependecies.&lt;/p&gt;
&lt;p&gt;7) YAGNI&lt;/p&gt;
&lt;p&gt;We are looking on possibilties to move our server code to this paradigm.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22628" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22627</link><pubDate>Fri, 03 Jul 2009 19:21:11 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22627</guid><dc:creator>Rod Paddock</dc:creator><description>&lt;p&gt;Hey dood! This blog post was EXACTLY what I happened to be looking for in some development I am doing now. Good job!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22627" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22626</link><pubDate>Fri, 03 Jul 2009 19:20:24 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22626</guid><dc:creator>Daniel Auger</dc:creator><description>&lt;p&gt;Just wondering - is a container going to be used throughout the Asp.NET MVC in Action book?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22626" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22624</link><pubDate>Fri, 03 Jul 2009 18:52:34 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22624</guid><dc:creator>chadmyers</dc:creator><description>&lt;p&gt;If they don&amp;#39;t want to force you to use DI/IoC, they should use their own default one (maybe embed the source from one of the micro-IoC frameworks into your code as long as its all open source). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Self-servicing dependencies via the c&amp;#39;tor is almost always wrong. I&amp;#39;d say this is one of the &amp;#39;definitely wrong&amp;#39; cases.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22624" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22623</link><pubDate>Fri, 03 Jul 2009 18:46:12 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22623</guid><dc:creator>bogardj</dc:creator><description>&lt;p&gt;@Neil&lt;/p&gt;
&lt;p&gt;Thanks, I forgot that term!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22623" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22622</link><pubDate>Fri, 03 Jul 2009 18:45:09 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22622</guid><dc:creator>bogardj</dc:creator><description>&lt;p&gt;@Kyle&lt;/p&gt;
&lt;p&gt;No, in their example, I think it&amp;#39;s quite reasonable, given the size of the app. &amp;nbsp;Since it&amp;#39;s so easy to do real DI, I don&amp;#39;t see the pain of doing the real thing.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22622" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22620</link><pubDate>Fri, 03 Jul 2009 17:58:12 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22620</guid><dc:creator>Kyle Baley</dc:creator><description>&lt;p&gt;Yeah, I wouldn&amp;#39;t fault anyone for using poor-man&amp;#39;s dependency injection. At least not without looking at the rest of the code. It&amp;#39;s a nice first step to get your feet wet with dependency injection, yesno? Then you can move on to maybe rolling your own DI container, then switching to a third-party one. That&amp;#39;s just based on how I was taught, I guess.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22620" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22617</link><pubDate>Fri, 03 Jul 2009 17:03:45 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22617</guid><dc:creator>Scott Muc</dc:creator><description>&lt;p&gt;I personally don&amp;#39;t see that as a terrible thing. If you know what the negatives are, it&amp;#39;s a great way to develop a SMALL project without introducing a container. &lt;/p&gt;
&lt;p&gt;The code is still testable because the constructor still allows the injection of fakes.&lt;/p&gt;
&lt;p&gt;I believe this style of DI has a name. It&amp;#39;s called &amp;quot;Poor Mans Dependency Injection&amp;quot;, and I personally believe it&amp;#39;s fine for personal projects. Whether or not it&amp;#39;s a good thing for NerdDinner to be doing is another question. I&amp;#39;m sure they implemented DI that way knowing full well the negatives of that implementation.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22617" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22616</link><pubDate>Fri, 03 Jul 2009 17:01:23 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22616</guid><dc:creator>Shawn Miller</dc:creator><description>&lt;p&gt;Thanks for demonstrating this implementation. To be fair, the Professional ASP.NET MVC 1.0 book makes this point:&lt;/p&gt;
&lt;p&gt;&amp;quot;ASP.NET MVC exposes extensibility APIs that enable developers to participate in the resolution and instantiation of controllers, and that enables Dependency Injection/IoC frameworks to be cleanly integrated within this process. Using a DI/IOC framework would also enable us to remove the default constructor from our DinnersController - which would completely remove the coupling between it and the DinnerRepositorys.&lt;/p&gt;
&lt;p&gt;We won&amp;#39;t be using a dependency injection/IOC framework with our NerdDinner applicaiton. But it is something we could consider for the future if the NerdDinner code-base and capabilities grew.&amp;quot;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22616" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22615</link><pubDate>Fri, 03 Jul 2009 16:58:18 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22615</guid><dc:creator>Eric Polerecky</dc:creator><description>&lt;p&gt;Nice article; you show how to jump into DI with little overhead. For me; ND is a good sample of a simple way to starting to think about loose coupling without additional software. &lt;/p&gt;
&lt;p&gt;My largest client is a very large county government; the amount of hoops I have to jump thru to use any new software is mind blowing. ND offers me a good sample to show DI...well more just loos coupling...with zero overhead (additional software)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22615" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22614</link><pubDate>Fri, 03 Jul 2009 16:35:08 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22614</guid><dc:creator>Jon Kruger</dc:creator><description>&lt;p&gt;They probably did it that way because they couldn&amp;#39;t force anyone to use a specific DI container. &amp;nbsp;I see other problems in MVC samples where they probably wanted to use a DI container but couldn&amp;#39;t, so they end up with half-baked dependency injection.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22614" width="1" height="1"&gt;</description></item><item><title>re: How not to do Dependency Injection, in NerdDinner</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx#22613</link><pubDate>Fri, 03 Jul 2009 16:33:07 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22613</guid><dc:creator>Neil Mosafi</dc:creator><description>&lt;p&gt;It&amp;#39;s known as &amp;quot;poor man&amp;#39;s dependency injection&amp;quot;.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22613" width="1" height="1"&gt;</description></item><item><title>re: Congrats to the Los Techies MVPs!</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/01/congrats-to-the-los-techies-mvps.aspx#22607</link><pubDate>Fri, 03 Jul 2009 13:26:44 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22607</guid><dc:creator>Danilo Mendoza</dc:creator><description>&lt;p&gt;Congrats to you all!!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22607" width="1" height="1"&gt;</description></item><item><title>re: Congrats to the Los Techies MVPs!</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/01/congrats-to-the-los-techies-mvps.aspx#22594</link><pubDate>Thu, 02 Jul 2009 19:51:55 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22594</guid><dc:creator>Jeffrey Palermo</dc:creator><description>&lt;p&gt;Congrats, Jimmy!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22594" width="1" height="1"&gt;</description></item><item><title>re: Congrats to the Los Techies MVPs!</title><link>http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/01/congrats-to-the-los-techies-mvps.aspx#22589</link><pubDate>Thu, 02 Jul 2009 16:07:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22589</guid><dc:creator>Gabriel N. Schenker</dc:creator><description>&lt;p&gt;congratulations Jimmy! You deserve it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22589" width="1" height="1"&gt;</description></item></channel></rss>