<?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: Dependency injection in real world</title>
	<atom:link href="http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx</link>
	<description>Coding dreams since 1998!</description>
	<lastBuildDate>Thu, 17 Jan 2013 18:15:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: karli</title>
		<link>http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx#comment-259</link>
		<dc:creator>karli</dc:creator>
		<pubDate>Fri, 30 Jan 2009 19:53:24 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-259</guid>
		<description><![CDATA[&lt;p&gt;thank you,&lt;/p&gt;
&lt;p&gt;i did solve my problem a little bit different (but i think its ok) :)&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>thank you,</p>
<p>i did solve my problem a little bit different (but i think its ok) <img src='http://blog.vuscode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malovicn</title>
		<link>http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx#comment-258</link>
		<dc:creator>malovicn</dc:creator>
		<pubDate>Tue, 20 Jan 2009 09:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-258</guid>
		<description><![CDATA[&lt;p&gt;Karli,&lt;/p&gt;
&lt;p&gt;make your Resolver-TYpe to be singleton (static class e.g.) and register mapping in application start event of global.asax&lt;/p&gt;
&lt;p&gt;Your CORE library would be loaded during the bootup in the context of web application and therefore it would be able to retreive IRepository service&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Nikola&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Karli,</p>
<p>make your Resolver-TYpe to be singleton (static class e.g.) and register mapping in application start event of global.asax</p>
<p>Your CORE library would be loaded during the bootup in the context of web application and therefore it would be able to retreive IRepository service</p>
<p>HTH,</p>
<p>Nikola</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karli</title>
		<link>http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx#comment-257</link>
		<dc:creator>karli</dc:creator>
		<pubDate>Thu, 08 Jan 2009 12:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-257</guid>
		<description><![CDATA[&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;this article and the series of DI articles are very good written (esp. the samples are perfect).&lt;/p&gt;
&lt;p&gt;may i ask you a question regarding the implementation: in my project, i have a class-lib-project (CORE) where there are a lot of repositories and manager classes. i have on Resolver-Type, and if i need some sort of repository, i call Resolver.Resolve&lt;T&gt; ... &#160;(it s a little bit like your facade.resolver).&lt;/p&gt;
&lt;p&gt;this all works well.&lt;/p&gt;
&lt;p&gt;now i have a web-project, this instantiates the repository/manager classes of CORE. therefore this project also needs a DI container.&lt;/p&gt;
&lt;p&gt;this also works well.&lt;/p&gt;
&lt;p&gt;now, i wanted to reduce type-creations, so e.g. the user-repository should only be created one time. so i choosed to type it as singleton (with unity). &lt;/p&gt;
&lt;p&gt;but, because CORE instantiates a container, and web instantiates a container, i have two instances of that particular repository.&lt;/p&gt;
&lt;p&gt;what is your tipp to solve this part of my problem?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>this article and the series of DI articles are very good written (esp. the samples are perfect).</p>
<p>may i ask you a question regarding the implementation: in my project, i have a class-lib-project (CORE) where there are a lot of repositories and manager classes. i have on Resolver-Type, and if i need some sort of repository, i call Resolver.Resolve&lt;T&gt; &#8230; &nbsp;(it s a little bit like your facade.resolver).</p>
<p>this all works well.</p>
<p>now i have a web-project, this instantiates the repository/manager classes of CORE. therefore this project also needs a DI container.</p>
<p>this also works well.</p>
<p>now, i wanted to reduce type-creations, so e.g. the user-repository should only be created one time. so i choosed to type it as singleton (with unity). </p>
<p>but, because CORE instantiates a container, and web instantiates a container, i have two instances of that particular repository.</p>
<p>what is your tipp to solve this part of my problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malovicn</title>
		<link>http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx#comment-256</link>
		<dc:creator>malovicn</dc:creator>
		<pubDate>Mon, 29 Dec 2008 13:36:55 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-256</guid>
		<description><![CDATA[&lt;p&gt;Oh, &lt;/p&gt;
&lt;p&gt;here it is: the proof of how stupid copy- paste driven development can be :)&lt;/p&gt;
&lt;p&gt;I&#039;ve updated the source code and blog post&lt;/p&gt;
&lt;p&gt;Thanks for the tip!&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Oh, </p>
<p>here it is: the proof of how stupid copy- paste driven development can be <img src='http://blog.vuscode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve updated the source code and blog post</p>
<p>Thanks for the tip!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcel Popescu</title>
		<link>http://blog.vuscode.com/malovicn/archive/2008/12/23/dependency-injection-in-real-world.aspx#comment-255</link>
		<dc:creator>Marcel Popescu</dc:creator>
		<pubDate>Mon, 29 Dec 2008 10:20:27 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-255</guid>
		<description><![CDATA[&lt;p&gt;I loved this post and the previous one. One nitpick though:&lt;/p&gt;
&lt;p&gt;# public UserManagerSL(): this (ServiceLocator.Retrieve&lt;IUserProvider&gt;()) &#160;&lt;/p&gt;
&lt;p&gt;# &#160; &#160; &#160; &#160; { &#160;&lt;/p&gt;
&lt;p&gt;# &#160; &#160; &#160; &#160; &#160; &#160; this.userProvider = userProvider; &#160;&lt;/p&gt;
&lt;p&gt;# &#160; &#160; &#160; &#160; } &lt;/p&gt;
&lt;p&gt;There&#039;s no userProvider argument, and in fact you don&#039;t need a body for this constructor anyway, since you&#039;re calling the other constructor with this(...)&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I loved this post and the previous one. One nitpick though:</p>
<p># public UserManagerSL(): this (ServiceLocator.Retrieve&lt;IUserProvider&gt;()) &nbsp;</p>
<p># &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;</p>
<p># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.userProvider = userProvider; &nbsp;</p>
<p># &nbsp; &nbsp; &nbsp; &nbsp; } </p>
<p>There&#8217;s no userProvider argument, and in fact you don&#8217;t need a body for this constructor anyway, since you&#8217;re calling the other constructor with this(&#8230;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
