<?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"
	>
<channel>
	<title>Comments on: Looking at Context IoC</title>
	<atom:link href="http://www.magpiebrain.com/blog/2005/04/07/looking-at-context-ioc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.magpiebrain.com/blog/2005/04/07/looking-at-context-ioc/</link>
	<description>Sam Newman's blog</description>
	<pubDate>Fri, 21 Nov 2008 19:15:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Ryan Holmes</title>
		<link>http://www.magpiebrain.com/blog/2005/04/07/looking-at-context-ioc/#comment-671</link>
		<dc:creator>Ryan Holmes</dc:creator>
		<pubDate>Thu, 08 Sep 2005 20:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/2005/04/07/looking-at-context-ioc/#comment-671</guid>
		<description>The primary point of Context IOC is that it propogates dependencies up to the "top-object" to provide a single configuration point. 

If you're happy to unit test with hard-coded dependencies and you don't need to change those dependencies then - yes - this pattern just adds more complexity. On the other hand, if you're already using dependency injection, Context IOC is an interesting and arguably simpler option.

It's always good to question anything that adds more lines of code, but I think your comparisons to plain object aggregation are missing the point.

You mention that with Context IOC we still have to actually create objects. The point is that those objects will be created in only one place and propogated down rather than being created on the fly in various places. Dependencies are still passed via the constructor, so Sony is not advocating some kind of paradigm shift.

Having said all that, this pattern certainly could be a "solution in search of a problem" (I assume that's what Michael intended to say) in a lot of cases. But the same could be said about dependency injection and IOC in general, so I don't think that fact invalidates the pattern. If you're struggling with unit testing due to heavyweight dependencies, then that's a problem for which Context IOC provides an effective and framework-free solution.
</description>
		<content:encoded><![CDATA[<p>The primary point of Context IOC is that it propogates dependencies up to the &#8220;top-object&#8221; to provide a single configuration point. </p>
<p>If you&#8217;re happy to unit test with hard-coded dependencies and you don&#8217;t need to change those dependencies then - yes - this pattern just adds more complexity. On the other hand, if you&#8217;re already using dependency injection, Context IOC is an interesting and arguably simpler option.</p>
<p>It&#8217;s always good to question anything that adds more lines of code, but I think your comparisons to plain object aggregation are missing the point.</p>
<p>You mention that with Context IOC we still have to actually create objects. The point is that those objects will be created in only one place and propogated down rather than being created on the fly in various places. Dependencies are still passed via the constructor, so Sony is not advocating some kind of paradigm shift.</p>
<p>Having said all that, this pattern certainly could be a &#8220;solution in search of a problem&#8221; (I assume that&#8217;s what Michael intended to say) in a lot of cases. But the same could be said about dependency injection and IOC in general, so I don&#8217;t think that fact invalidates the pattern. If you&#8217;re struggling with unit testing due to heavyweight dependencies, then that&#8217;s a problem for which Context IOC provides an effective and framework-free solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Burke</title>
		<link>http://www.magpiebrain.com/blog/2005/04/07/looking-at-context-ioc/#comment-670</link>
		<dc:creator>Michael Burke</dc:creator>
		<pubDate>Fri, 08 Apr 2005 00:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/2005/04/07/looking-at-context-ioc/#comment-670</guid>
		<description>It's truly a problem in search of a solution. In other words, typical fare for denizens of the (once useful) serverside.com</description>
		<content:encoded><![CDATA[<p>It&#8217;s truly a problem in search of a solution. In other words, typical fare for denizens of the (once useful) serverside.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Deiters</title>
		<link>http://www.magpiebrain.com/blog/2005/04/07/looking-at-context-ioc/#comment-669</link>
		<dc:creator>Matthew Deiters</dc:creator>
		<pubDate>Thu, 07 Apr 2005 18:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/2005/04/07/looking-at-context-ioc/#comment-669</guid>
		<description>It appears he wanted to have the 'next' big thing...instead he just has 'another' bad idea.</description>
		<content:encoded><![CDATA[<p>It appears he wanted to have the &#8216;next&#8217; big thing&#8230;instead he just has &#8216;another&#8217; bad idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Stevenson</title>
		<link>http://www.magpiebrain.com/blog/2005/04/07/looking-at-context-ioc/#comment-668</link>
		<dc:creator>Chris Stevenson</dc:creator>
		<pubDate>Thu, 07 Apr 2005 14:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/2005/04/07/looking-at-context-ioc/#comment-668</guid>
		<description>Also his Context interface mixes concerns - the whole point of interfaces is that an interface encapsulates a single responsibility. The 'getApplicationProperty', 'draw' and 'savePoolGame' have no business being in the same interface.

If he's trying to make it more convenient to use mocks, then that is even worse - it just hides the smell "Too many dependencies".</description>
		<content:encoded><![CDATA[<p>Also his Context interface mixes concerns - the whole point of interfaces is that an interface encapsulates a single responsibility. The &#8216;getApplicationProperty&#8217;, &#8216;draw&#8217; and &#8216;savePoolGame&#8217; have no business being in the same interface.</p>
<p>If he&#8217;s trying to make it more convenient to use mocks, then that is even worse - it just hides the smell &#8220;Too many dependencies&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
