<?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: Using Google Guice Providers to Solve Law of Demeter Problems</title>
	<atom:link href="http://codemonkeyism.com/using-google-guice-providers-to-solve-law-of-demeter-problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/using-google-guice-providers-to-solve-law-of-demeter-problems/</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 06:49:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/using-google-guice-providers-to-solve-law-of-demeter-problems/comment-page-1/#comment-135733</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 24 Jul 2008 19:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/07/24/using-google-guice-providers-to-solve-law-of-demeter-problems/#comment-135733</guid>
		<description>@Doug: Of course you&#039;re right, my error, passing in &lt;code&gt;Context&lt;/code&gt; is IoC.

&quot;Sometimes that’s not possible. With IoC this can be solved without (much) refactoring.&quot;

Reading my post again, I didn&#039;t write that passing in a Context is not IoC, just that IoC can solve the problem.</description>
		<content:encoded><![CDATA[<p>@Doug: Of course you&#8217;re right, my error, passing in <code>Context</code> is IoC.</p>
<p>&#8220;Sometimes that’s not possible. With IoC this can be solved without (much) refactoring.&#8221;</p>
<p>Reading my post again, I didn&#8217;t write that passing in a Context is not IoC, just that IoC can solve the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://codemonkeyism.com/using-google-guice-providers-to-solve-law-of-demeter-problems/comment-page-1/#comment-135662</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Thu, 24 Jul 2008 16:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/07/24/using-google-guice-providers-to-solve-law-of-demeter-problems/#comment-135662</guid>
		<description>To be picky about terminology, passing a Context object IS a form of IoC. It&#039;s what used to be called &quot;Type 1&quot; IoC, or &quot;Contextualized Dependency Lookup&quot;. It&#039;s not Dependency Injection, but it IS Inversion of Control. (One could argue that the dependency on the injected context qualifies as DI, but I don&#039;t think that argument would win many supporters.) As noted, it&#039;s harder to test than DI is.

As for the Law of Demeter, I say &quot;ptthht.&quot; There are some places where it&#039;s a reasonable guideline, and many places where it isn&#039;t. The real problem with passing a Context object instead of an Engine object is one of increased coupling: the method is not only coupled to the Engine class but to the Context class as well.</description>
		<content:encoded><![CDATA[<p>To be picky about terminology, passing a Context object IS a form of IoC. It&#8217;s what used to be called &#8220;Type 1&#8243; IoC, or &#8220;Contextualized Dependency Lookup&#8221;. It&#8217;s not Dependency Injection, but it IS Inversion of Control. (One could argue that the dependency on the injected context qualifies as DI, but I don&#8217;t think that argument would win many supporters.) As noted, it&#8217;s harder to test than DI is.</p>
<p>As for the Law of Demeter, I say &#8220;ptthht.&#8221; There are some places where it&#8217;s a reasonable guideline, and many places where it isn&#8217;t. The real problem with passing a Context object instead of an Engine object is one of increased coupling: the method is not only coupled to the Engine class but to the Context class as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 4/12 queries in 0.009 seconds using disk

Served from: codemonkeyism.com @ 2010-07-30 12:35:58 -->