<?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: What is Dependency Injection? Go Ask a Java Nerd!</title>
	<atom:link href="http://lebensold.net/development/what-is-dependency-injection-go-ask-a-java-nerd/feed" rel="self" type="application/rss+xml" />
	<link>http://lebensold.net/development/what-is-dependency-injection-go-ask-a-java-nerd</link>
	<description>thoughts on web development, technology and media</description>
	<lastBuildDate>Thu, 10 Jun 2010 13:07:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ezra</title>
		<link>http://lebensold.net/development/what-is-dependency-injection-go-ask-a-java-nerd/comment-page-1#comment-3427</link>
		<dc:creator>ezra</dc:creator>
		<pubDate>Mon, 01 Sep 2008 18:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://jon.lebensold.ca/?p=141#comment-3427</guid>
		<description>Wait a moment, this isn&#039;t relationship advice?
Baah.</description>
		<content:encoded><![CDATA[<p>Wait a moment, this isn&#8217;t relationship advice?<br />
Baah.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henk</title>
		<link>http://lebensold.net/development/what-is-dependency-injection-go-ask-a-java-nerd/comment-page-1#comment-3380</link>
		<dc:creator>Henk</dc:creator>
		<pubDate>Sun, 31 Aug 2008 15:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://jon.lebensold.ca/?p=141#comment-3380</guid>
		<description>I was a bit confused until I went and looked up DI, and found that it doesn&#039;t actually have anything to do with the factory, but with the fact that you&#039;re passing in the components of the Kitchen as arguments to its constructor. In effect, the caller, the outer part of the program, is controlling the inner behaviour of the Kitchen while letting the callee (Kitchen) handle the middle parts.

What&#039;s interesting is that this sort of division of control is found all over the place, not just for the composition of objects. For example, &#039;map&#039; in functional programming languages takes a function and a list, and returns a list of the function applied to each of the elements of the old list.

map(add1, list(1, 2, 3)) == list(2, 3, 4), where add1 is a function which returns its argument plus 1

In this case the caller handles what behaviour is used inside of map, while the map function itself handles looping and constructing the new list. 

It seems like a different concept, but it&#039;s really the same idea. What&#039;s powerful is the fact that behaviour itself, though it may be represented as a function or as an object, can be held in a variable and passed around your program.</description>
		<content:encoded><![CDATA[<p>I was a bit confused until I went and looked up DI, and found that it doesn&#8217;t actually have anything to do with the factory, but with the fact that you&#8217;re passing in the components of the Kitchen as arguments to its constructor. In effect, the caller, the outer part of the program, is controlling the inner behaviour of the Kitchen while letting the callee (Kitchen) handle the middle parts.</p>
<p>What&#8217;s interesting is that this sort of division of control is found all over the place, not just for the composition of objects. For example, &#8216;map&#8217; in functional programming languages takes a function and a list, and returns a list of the function applied to each of the elements of the old list.</p>
<p>map(add1, list(1, 2, 3)) == list(2, 3, 4), where add1 is a function which returns its argument plus 1</p>
<p>In this case the caller handles what behaviour is used inside of map, while the map function itself handles looping and constructing the new list. </p>
<p>It seems like a different concept, but it&#8217;s really the same idea. What&#8217;s powerful is the fact that behaviour itself, though it may be represented as a function or as an object, can be held in a variable and passed around your program.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: geoffrey</title>
		<link>http://lebensold.net/development/what-is-dependency-injection-go-ask-a-java-nerd/comment-page-1#comment-3373</link>
		<dc:creator>geoffrey</dc:creator>
		<pubDate>Sun, 31 Aug 2008 14:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://jon.lebensold.ca/?p=141#comment-3373</guid>
		<description>HAPPY BIRTHDAY!!!!!!!!!!!!!!!</description>
		<content:encoded><![CDATA[<p>HAPPY BIRTHDAY!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
