<?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: Is Dependency Injection the Golden Hammer?</title>
	<atom:link href="http://www.michaelyuan.com/blog/2005/06/04/is-dependency-injection-the-golden-hammer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelyuan.com/blog/2005/06/04/is-dependency-injection-the-golden-hammer/</link>
	<description>"Science is a wonderful thing if one does not have to earn one's living at it" -- Albert Einstein</description>
	<pubDate>Tue, 06 Jan 2009 22:41:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: c. kuharski</title>
		<link>http://www.michaelyuan.com/blog/2005/06/04/is-dependency-injection-the-golden-hammer/#comment-2343</link>
		<dc:creator>c. kuharski</dc:creator>
		<pubDate>Fri, 22 Dec 2006 21:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelyuan.com/blog/?p=19#comment-2343</guid>
		<description>I think you might be missing the point.  

I agree, EJB3 provides a quick and clean way for DI.  However, that class has now has taken on an additional role in addition it's original intent.   This is the use/abuse gift of annotations.  
The applications won't be as flexible or scalable.  You are stuck with something hard-coded into a class (some debate whether it even belongs there) and will be required to make non-code changes in the code..? Remember, annotations is not code but metadata in the code.  Kinda like having to the open a stove in order to change the recipe.  

Spring is a seperate layer that allows much more flexibility then what has been collapsed into the class.

For instance try dynamically at runtime creating new or modified business logic at runtime.  Can't unless you use Spring/jndi.  Then what's the point in annotations unless you are POSITIVE you don't need the flexiblity.  

Or better yet, try have the same class be injected with a different class depending on the layer.  Can be done, but not without a bunch of if logic.  This will also increase the classes responsibility.</description>
		<content:encoded><![CDATA[<p>I think you might be missing the point.  </p>
<p>I agree, EJB3 provides a quick and clean way for DI.  However, that class has now has taken on an additional role in addition it&#8217;s original intent.   This is the use/abuse gift of annotations.<br />
The applications won&#8217;t be as flexible or scalable.  You are stuck with something hard-coded into a class (some debate whether it even belongs there) and will be required to make non-code changes in the code..? Remember, annotations is not code but metadata in the code.  Kinda like having to the open a stove in order to change the recipe.  </p>
<p>Spring is a seperate layer that allows much more flexibility then what has been collapsed into the class.</p>
<p>For instance try dynamically at runtime creating new or modified business logic at runtime.  Can&#8217;t unless you use Spring/jndi.  Then what&#8217;s the point in annotations unless you are POSITIVE you don&#8217;t need the flexiblity.  </p>
<p>Or better yet, try have the same class be injected with a different class depending on the layer.  Can be done, but not without a bunch of if logic.  This will also increase the classes responsibility.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Yuan</title>
		<link>http://www.michaelyuan.com/blog/2005/06/04/is-dependency-injection-the-golden-hammer/#comment-9</link>
		<dc:creator>Michael Yuan</dc:creator>
		<pubDate>Sun, 01 Oct 2006 18:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelyuan.com/blog/?p=19#comment-9</guid>
		<description>Yes, but this entry was posted more than a year ago. It was just re-aggregated since I switched to wordpress. Sorry for the confusion.</description>
		<content:encoded><![CDATA[<p>Yes, but this entry was posted more than a year ago. It was just re-aggregated since I switched to wordpress. Sorry for the confusion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Devijver</title>
		<link>http://www.michaelyuan.com/blog/2005/06/04/is-dependency-injection-the-golden-hammer/#comment-8</link>
		<dc:creator>Steven Devijver</dc:creator>
		<pubDate>Sun, 01 Oct 2006 18:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.michaelyuan.com/blog/?p=19#comment-8</guid>
		<description>You're sitting on old data when it comes to Spring's JPA support: http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#d0e15816.</description>
		<content:encoded><![CDATA[<p>You&#8217;re sitting on old data when it comes to Spring&#8217;s JPA support: <a href="http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#d0e15816" rel="nofollow">http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#d0e15816</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
