<?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: External Value Configuration with IoC</title>
	<atom:link href="http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/</link>
	<description>Enterprise Development Expert &#38; SOA Specialist</description>
	<lastBuildDate>Fri, 23 Jul 2010 18:21:18 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-27058</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sat, 12 Jul 2008 13:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-27058</guid>
		<description>Dan (and Jeremy),

Consider a system that has many processes installed in various configurations on many machines.

It&#039;s quite a bit more difficult to do automated integration tests in this environment.</description>
		<content:encoded><![CDATA[<p>Dan (and Jeremy),</p>
<p>Consider a system that has many processes installed in various configurations on many machines.</p>
<p>It&#8217;s quite a bit more difficult to do automated integration tests in this environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Ports</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-26987</link>
		<dc:creator>Dan Ports</dc:creator>
		<pubDate>Fri, 11 Jul 2008 17:57:30 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-26987</guid>
		<description>I agree with Jeremy Miller that you exaggerate the problem. Even very minimal automated integration tests should pick up issues with configuration values being added, renamed, or deleted, so refactoring support, while nice, does not seem that crucial to me. Is there something we are missing?</description>
		<content:encoded><![CDATA[<p>I agree with Jeremy Miller that you exaggerate the problem. Even very minimal automated integration tests should pick up issues with configuration values being added, renamed, or deleted, so refactoring support, while nice, does not seem that crucial to me. Is there something we are missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Hildreth</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-25088</link>
		<dc:creator>Mark Hildreth</dc:creator>
		<pubDate>Tue, 17 Jun 2008 10:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-25088</guid>
		<description>&gt; Just like in my reply to Jeremy Gray, I still need to generate an instance of the class which allows me to intercept calls to its properties for that to work.

Udi,

I&#039;m not sure I understand the problem with their solutions. You shouldn&#039;t need to intercept anything. The lambda function will simply be an Action which you can store either alongside (or using whatever Spring&#039;s equivalent is to a Windsor&#039;s &quot;Facility&quot;). Then, when you create an instance, invoke all those Action objects on the newly built object.

Is there a specific problem with the need to use the container to set the properties rather than invoke them manually after the container builds the instance? If there is, I&#039;m not sure you could get away with using Expressions without some funky hack, since you would probably want to use the setter, but IIRC Expressions do not allow for using the assignment operator.</description>
		<content:encoded><![CDATA[<p>&gt; Just like in my reply to Jeremy Gray, I still need to generate an instance of the class which allows me to intercept calls to its properties for that to work.</p>
<p>Udi,</p>
<p>I&#8217;m not sure I understand the problem with their solutions. You shouldn&#8217;t need to intercept anything. The lambda function will simply be an Action which you can store either alongside (or using whatever Spring&#8217;s equivalent is to a Windsor&#8217;s &#8220;Facility&#8221;). Then, when you create an instance, invoke all those Action objects on the newly built object.</p>
<p>Is there a specific problem with the need to use the container to set the properties rather than invoke them manually after the container builds the instance? If there is, I&#8217;m not sure you could get away with using Expressions without some funky hack, since you would probably want to use the setter, but IIRC Expressions do not allow for using the assignment operator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24888</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 15 Jun 2008 21:53:07 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24888</guid>
		<description>Jeremy Miller,

Re, &quot;All you need to do is strip out the property name and value both from the expression passed in.&quot;

How do I do that?</description>
		<content:encoded><![CDATA[<p>Jeremy Miller,</p>
<p>Re, &#8220;All you need to do is strip out the property name and value both from the expression passed in.&#8221;</p>
<p>How do I do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24887</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 15 Jun 2008 21:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24887</guid>
		<description>Nick,

Just like in my reply to Jeremy Gray, I still need to generate an instance of the class which allows me to intercept calls to its properties for that to work.</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>Just like in my reply to Jeremy Gray, I still need to generate an instance of the class which allows me to intercept calls to its properties for that to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udidahan</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24886</link>
		<dc:creator>udidahan</dc:creator>
		<pubDate>Sun, 15 Jun 2008 21:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24886</guid>
		<description>Jeremy Gray,

The difficulty is in knowing what the expression (or function) does so that I can use it to configure the underlying component, so I&#039;m afraid that what you showed would run into the same problems.</description>
		<content:encoded><![CDATA[<p>Jeremy Gray,</p>
<p>The difficulty is in knowing what the expression (or function) does so that I can use it to configure the underlying component, so I&#8217;m afraid that what you showed would run into the same problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy D. Miller</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24811</link>
		<dc:creator>Jeremy D. Miller</dc:creator>
		<pubDate>Sun, 15 Jun 2008 07:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24811</guid>
		<description>Using Expressions in .Net 3.5 could potentially shut that little source of errors down -- and that might just happen soon with one of the IoC tools.  All you need to do is strip out the property name and value both from the expression passed in.

I think you&#039;re exaggerating the problem though.  Any level of automated testing should find those errors in an easy to troubleshoot manner.  StructureMap would blow up if any argument was missing and tell you the exact constructor argument that was missing.  If your IoC configuration is in any way complex, put some environment tests into your build procedures that check on all the configured instances.</description>
		<content:encoded><![CDATA[<p>Using Expressions in .Net 3.5 could potentially shut that little source of errors down &#8212; and that might just happen soon with one of the IoC tools.  All you need to do is strip out the property name and value both from the expression passed in.</p>
<p>I think you&#8217;re exaggerating the problem though.  Any level of automated testing should find those errors in an easy to troubleshoot manner.  StructureMap would blow up if any argument was missing and tell you the exact constructor argument that was missing.  If your IoC configuration is in any way complex, put some environment tests into your build procedures that check on all the configured instances.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Blumhardt</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24720</link>
		<dc:creator>Nicholas Blumhardt</dc:creator>
		<pubDate>Sat, 14 Jun 2008 06:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24720</guid>
		<description>BTW, that one will work when the properties aren&#039;t virtual.

If you really need to get at that configuration information as _data_, you could do the same thing in .NET 3.5 by accepting an Expression rather than an Action as the parameter to OnActivating() - with some minor restrictions.

Cheers</description>
		<content:encoded><![CDATA[<p>BTW, that one will work when the properties aren&#8217;t virtual.</p>
<p>If you really need to get at that configuration information as _data_, you could do the same thing in .NET 3.5 by accepting an Expression rather than an Action as the parameter to OnActivating() &#8211; with some minor restrictions.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Blumhardt</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24719</link>
		<dc:creator>Nicholas Blumhardt</dc:creator>
		<pubDate>Sat, 14 Jun 2008 06:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24719</guid>
		<description>G&#039;day Udi!

How about considering configuration based on a function? E.g. along the lines of:

builder
  .ConfigureComponent(ComponentCallModelEnum.Singleton)
  .OnActivating(instance =&gt; {
    instance.DefaultNumberOfSendThreads = 10;
    instance.DefaultNumberOfWorkerThreads = 20;
  });

?

Cheers,

Nick</description>
		<content:encoded><![CDATA[<p>G&#8217;day Udi!</p>
<p>How about considering configuration based on a function? E.g. along the lines of:</p>
<p>builder<br />
  .ConfigureComponent(ComponentCallModelEnum.Singleton)<br />
  .OnActivating(instance =&gt; {<br />
    instance.DefaultNumberOfSendThreads = 10;<br />
    instance.DefaultNumberOfWorkerThreads = 20;<br />
  });</p>
<p>?</p>
<p>Cheers,</p>
<p>Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24701</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 14 Jun 2008 02:44:34 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24701</guid>
		<description>Might want to take a look at autofac.  It is a very full featured IoC container written from the ground up in C# 3.0, no strings or ugly xml necessary.</description>
		<content:encoded><![CDATA[<p>Might want to take a look at autofac.  It is a very full featured IoC container written from the ground up in C# 3.0, no strings or ugly xml necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Gray</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24671</link>
		<dc:creator>Jeremy Gray</dc:creator>
		<pubDate>Fri, 13 Jun 2008 18:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24671</guid>
		<description>re: &quot;instead of Func&quot; I mistyped that while meaning &quot;instead of Action&quot;.</description>
		<content:encoded><![CDATA[<p>re: &#8220;instead of Func&#8221; I mistyped that while meaning &#8220;instead of Action&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Gray</title>
		<link>http://www.udidahan.com/2008/06/13/external-value-configuration-with-ioc/comment-page-1/#comment-24670</link>
		<dc:creator>Jeremy Gray</dc:creator>
		<pubDate>Fri, 13 Jun 2008 18:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/06/13/external-value-configuration-with-ioc/#comment-24670</guid>
		<description>Regarding the need for the properties to be virtual, would a syntax like the following not solve that problem quite easily?

(I don&#039;t know how well the characters will make it through your comment system, but hopefully the point will come across.)

builder.ConfigureComponent(ComponentCallModelEnum.Singleton)
  .Configure(o =&gt; o.DefaultNumberOfSenderThreads = 10)
  .Configure(o =&gt; o.DefaultNumberOfWorkerThreads = 10);

or some version that merges both property assignments into one lambda passed into a single .Configure call? These delegates would then be executed directly against the instantiated component, and could even be typed as Expression instead of Func if you wanted to be able to generate their text representation at runtime to provide diagnostic output.</description>
		<content:encoded><![CDATA[<p>Regarding the need for the properties to be virtual, would a syntax like the following not solve that problem quite easily?</p>
<p>(I don&#8217;t know how well the characters will make it through your comment system, but hopefully the point will come across.)</p>
<p>builder.ConfigureComponent(ComponentCallModelEnum.Singleton)<br />
  .Configure(o =&gt; o.DefaultNumberOfSenderThreads = 10)<br />
  .Configure(o =&gt; o.DefaultNumberOfWorkerThreads = 10);</p>
<p>or some version that merges both property assignments into one lambda passed into a single .Configure call? These delegates would then be executed directly against the instantiated component, and could even be typed as Expression instead of Func if you wanted to be able to generate their text representation at runtime to provide diagnostic output.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
