<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx</link><description>I started an interesting thread when I weighed in on the use of IoC and the Dependency Injection pattern a few days back. Seems I wasn't sufficiently supportive of the concept of lightweight containers to please some of my readers. Should we, the blog</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>BioSensorAB &amp;raquo; Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7814530</link><pubDate>Wed, 20 Feb 2008 12:46:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7814530</guid><dc:creator>BioSensorAB » Inversion of control, part two</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.biosensorab.org/2008/02/20/inversion-of-control-part-two/"&gt;http://www.biosensorab.org/2008/02/20/inversion-of-control-part-two/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7820633</link><pubDate>Wed, 20 Feb 2008 20:01:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7820633</guid><dc:creator>Nick</dc:creator><description>&lt;p&gt;&amp;quot;IoC is complex and to use it well requires training. &amp;quot;&lt;/p&gt;
&lt;p&gt;Can you provide some supporting evidence (anecdotes are fine) for this statement? Is this tool-complexity (&amp;quot;I can't figure out how to configure this thing!&amp;quot;, concept-complexity (&amp;quot;I can't figure out what this thing does!&amp;quot;) or imparted application-complexity (&amp;quot;My app is a mess now that I'm using this thing!&amp;quot;)?&lt;/p&gt;
&lt;p&gt;I'd certainly agree that writing new-apps-from-scratch with pervasive DI is revolutionary, but application complexity should be reduced, and it should be reduced a lot. In my experience, the difficulty to maintain an app is correlated more closely to the application's complexity rather than the tools used. &lt;/p&gt;</description></item><item><title>re: Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7821636</link><pubDate>Wed, 20 Feb 2008 21:16:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7821636</guid><dc:creator>NickMalik</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;Love your URL. &amp;nbsp;I'm a DDR fan.&lt;/p&gt;
&lt;p&gt;We are actually already on the same page. &amp;nbsp;&amp;quot;Writing new apps from scratch with pervasive DI is revolutionary.&amp;quot; &amp;nbsp;What makes it revolutionary?&lt;/p&gt;
&lt;p&gt;The structure of the code changes, for the better. &amp;nbsp;Your classes are cleaner and better defined, because there are constraints on the way you wire things together. &amp;nbsp;What happens is that you change the way you think about code, and the way you approach development.&lt;/p&gt;
&lt;p&gt;Support developers write code. &amp;nbsp;If IoC is to have the impact it was designed to have, then Support developers need to write code in the same modern way. &amp;nbsp;They have to think about the app using the same new approach.&lt;/p&gt;
&lt;p&gt;Support developers are developers too. &amp;nbsp;In many teams, there are no support developers... just developers, and they do both. &amp;nbsp;That's the second case I mentioned above. &amp;nbsp;Best case for adopting new ways of doing things. &amp;nbsp;However, in a lot of very large organizations, and plenty of smaller ones, there are people who do nothing but support.&lt;/p&gt;
&lt;p&gt;These folks will spend 80% of their time fixing code that was written 5-20 years ago. &amp;nbsp;There were no lightweight containers five years ago. &amp;nbsp;So the code they deal with (40 weeks out of the year) is not based on IoC. &amp;nbsp;They are lucky if patterns show up!&lt;/p&gt;
&lt;p&gt;Imagine you are one of these folks. &amp;nbsp;You get a nice shiny new application written with IoC. &amp;nbsp;You have one day to fix something. &amp;nbsp;You have never seen a lightweight container before. &amp;nbsp; You may, or may not, have access to a diagram that tells you how the classes relate. &amp;nbsp;You have no time to read spec documents. &amp;nbsp;Just fix it.&lt;/p&gt;
&lt;p&gt;So you look through the code and try to find the places where class A method X is called. &amp;nbsp;Guess what. &amp;nbsp;It's not called. &amp;nbsp;Not in the code, anyway. &amp;nbsp;And you know it has to be called, because that is the class where the bug is. &amp;nbsp;But you want to make sure that your change won't damage anything. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Quick, write a new class, put in direct calls. &amp;nbsp;Ignore the config file. &amp;nbsp;Compile and go. &amp;nbsp;Fix is in.&lt;/p&gt;
&lt;p&gt;And thus begins the inevitable decay.&lt;/p&gt;
&lt;p&gt;For someone in this predicament, IoC raises complexity because it is outside what they are used to dealing with. &amp;nbsp;They have to learn to think the same way as the new-code-developer. &amp;nbsp;They have to discover those lessons. &amp;nbsp;Learn debugging techniques. &amp;nbsp;Understand what it means to drive connections through configuration.&lt;/p&gt;
&lt;p&gt;It's a people problem.&lt;/p&gt;
&lt;p&gt;People problems can be solved. &amp;nbsp;If you create a consistent standard across the IT group, or a sizable portion of the IT group: ALL CODE SHALL BE WRITTEN IN THIS WAY, and train everyone, then you can afford to dedicate some support folks to handling ONLY NEW CODE. &amp;nbsp;Put IoC and new design practices in this bucket and support it.&lt;/p&gt;
&lt;p&gt;Then you can afford to train people to maintain the code. &amp;nbsp;Because then they can &amp;quot;see&amp;quot; and &amp;quot;understand&amp;quot; the new way of thinking that comes with IoC. &amp;nbsp;Their efforts to support won't introduce corruption in the design.&lt;/p&gt;
&lt;p&gt;Revolution requires indoctrination, my friend.&lt;/p&gt;
</description></item><item><title>re: Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7839939</link><pubDate>Thu, 21 Feb 2008 20:09:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7839939</guid><dc:creator>Evan</dc:creator><description>&lt;p&gt;I wonder if there are any other industries that do this--ignore innovation and future cost savings due to the short-term overhead of training.&lt;/p&gt;
&lt;p&gt;I do like what Ed Deming once said..&lt;/p&gt;
&lt;p&gt;&amp;quot;It is not necessary to change. Survival is not mandatory&amp;quot;&lt;/p&gt;</description></item><item><title>re: Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7842459</link><pubDate>Fri, 22 Feb 2008 01:12:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7842459</guid><dc:creator>NickMalik</dc:creator><description>&lt;p&gt;Hi Evan,&lt;/p&gt;
&lt;p&gt;All the time. &amp;nbsp;Most industries take innovation carefully. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Toyota had a huge internal fight when they decided to create a hybrid Prius, because of the huge costs of change that had to happen throughout the company and dealership network. &amp;nbsp;That's the primary reason that they released the Prius in japan years before releasing in the US, and why their first two years, they produced the Prius at half-capacity and limited the dealerships that could sell it.&lt;/p&gt;
&lt;p&gt;I should know... I bought one.&lt;/p&gt;
&lt;p&gt;Why do you think the american car companies have such a hard time releasing new technologies? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, to answer your question: yes, yes, yes, yes, yes.&lt;/p&gt;
&lt;p&gt;Ours is one of the ONLY professions that puts innovation above other attributes. &amp;nbsp;We are the weird ones.&lt;/p&gt;
&lt;p&gt;--- Nick&lt;/p&gt;
</description></item><item><title>Sam Gentile's Inessential List of Tools</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7956527</link><pubDate>Fri, 29 Feb 2008 21:43:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7956527</guid><dc:creator>External</dc:creator><description>&lt;p&gt;I get asked a lot what tools I use, and have planned to write a post. As my buddy Harry got there first&lt;/p&gt;
</description></item><item><title>re: Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7964021</link><pubDate>Sat, 01 Mar 2008 01:01:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7964021</guid><dc:creator>Bill Pierce</dc:creator><description>&lt;p&gt;Hey Nick,&lt;/p&gt;
&lt;p&gt;In your previous post you query Udi for &amp;quot;numbers that show that software written using an IoC container is measurably easier for a team to maintain?&amp;quot; &amp;nbsp;I doubt he can provide them but he may surprise me. &amp;nbsp;Conversely you do not share any numbers or empirical evidence to support the contrary so this dissolves into a &amp;quot;my experience shows&amp;quot; discussion. &amp;nbsp;Which is fine, it just means we can both be right : )&lt;/p&gt;
&lt;p&gt;Your example that we should not introduce revolutionary changes because 5-20 years from now the poor schlep who has to fix a bug fill find IoC “outside what they are used to dealing with.” &amp;nbsp; This argument comes up often and generally involves Mort who we dismiss as an imbecile that cannot write code unless there is a visual designer to help him. &amp;nbsp;Dependency Injection is an extremely simple concept. &amp;nbsp; And a good IoC container abstracts the complicated parts of configuration and management to provide low friction to allow you to fully take advantage of DI. &amp;nbsp;If a support dev finds a bug in the container, then yes she needs to have knowledge of IoC. &amp;nbsp;Otherwise there is nothing preventing her from “Quick, write a new class, put in direct calls. &amp;nbsp;Ignore the config file. &amp;nbsp;Compile and go. &amp;nbsp;Fix is in.”&lt;/p&gt;
&lt;p&gt;I use IoC very effectively and its usage in my applications is nearly transparent. &amp;nbsp;If you are burdened with configuration, management, or training issues then you may be using the wrong container. &amp;nbsp;Nothing is right for everything and IoC is no exception. &amp;nbsp;But I have yet to see a valid argument against Dependency Injection.&lt;/p&gt;
&lt;p&gt;You are absolutely correct, it is a people problem. &amp;nbsp;Don’t add to the problem by not investing in your people or designing and coding to the dumbest common denominator.&lt;/p&gt;
&lt;p&gt;-Bill&lt;/p&gt;</description></item><item><title>re: Inversion of control, part two</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#7966491</link><pubDate>Sat, 01 Mar 2008 02:33:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7966491</guid><dc:creator>NickMalik</dc:creator><description>&lt;p&gt;Hi Bill,&lt;/p&gt;
&lt;p&gt;The fact that more than 75% of the problem I care about cannot be solved with coding practice, then I have the weight of benefit on my side. &amp;nbsp;In other words, there is no reason to believe, empirically or not, that IoC will actually make code easier to maintain.&lt;/p&gt;
&lt;p&gt;That said, I like DI. &amp;nbsp;It just isn't a silver bullet.&lt;/p&gt;
</description></item><item><title>IoC Container, Unity and Breaking Changes Galore</title><link>http://blogs.msdn.com/nickmalik/archive/2008/02/20/inversion-of-control-part-two.aspx#8089696</link><pubDate>Fri, 07 Mar 2008 10:21:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8089696</guid><dc:creator>Matthew Podwysocki's Blog</dc:creator><description>&lt;p&gt;As Grigori Melnik noted on my blog previously as well as his own , there was a brand new drop of the&lt;/p&gt;
</description></item></channel></rss>