<?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: Unity: The Static Factory Extension</title>
	<atom:link href="http://lostechies.com/derekgreer/2009/06/15/unity-static-factory-extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derekgreer/2009/06/15/unity-static-factory-extension/</link>
	<description>pursuing well-crafted software</description>
	<lastBuildDate>Wed, 12 Jun 2013 15:15:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Derek</title>
		<link>http://lostechies.com/derekgreer/2009/06/15/unity-static-factory-extension/#comment-137</link>
		<dc:creator>Derek</dc:creator>
		<pubDate>Tue, 18 May 2010 13:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.aspiringcraftsman.com/2009/06/unity-the-static-factory-extension/#comment-137</guid>
		<description>I don&#039;t recommend using XML-based DI configuration for a couple of reasons.

First, DI is a run-time composition concern, not a run-time configuration concern.  While the XML support offered by most frameworks could be used to facilitate general purpose plug-in support for an application, the ability for an end-user to change every dependency within an application is generally not needed and even undesirable.  Additionally, the configuration schema of most frameworks isn&#039;t designed and optimized around extensibility (i.e. it isn&#039;t designed to make end user configuration simple and straight forward).

Second, XML-based DI configuration offers no intellisense.  This means the configuration is not as discoverable, will be more tedious to setup, and delays the discovery of configuration errors until run-time.

Ultimately, DI is really a necessary evil required to accommodate loose coupling within an application.  If you are looking for plug-in support, I would recommend examining the Plugin pattern or exploring MAF and MEF.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t recommend using XML-based DI configuration for a couple of reasons.</p>
<p>First, DI is a run-time composition concern, not a run-time configuration concern.  While the XML support offered by most frameworks could be used to facilitate general purpose plug-in support for an application, the ability for an end-user to change every dependency within an application is generally not needed and even undesirable.  Additionally, the configuration schema of most frameworks isn&#8217;t designed and optimized around extensibility (i.e. it isn&#8217;t designed to make end user configuration simple and straight forward).</p>
<p>Second, XML-based DI configuration offers no intellisense.  This means the configuration is not as discoverable, will be more tedious to setup, and delays the discovery of configuration errors until run-time.</p>
<p>Ultimately, DI is really a necessary evil required to accommodate loose coupling within an application.  If you are looking for plug-in support, I would recommend examining the Plugin pattern or exploring MAF and MEF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://lostechies.com/derekgreer/2009/06/15/unity-static-factory-extension/#comment-136</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Sat, 15 May 2010 22:56:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.aspiringcraftsman.com/2009/06/unity-the-static-factory-extension/#comment-136</guid>
		<description>Hi! Could you please provide a simple example to configure an static factory via XML? Thanks!</description>
		<content:encoded><![CDATA[<p>Hi! Could you please provide a simple example to configure an static factory via XML? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek</title>
		<link>http://lostechies.com/derekgreer/2009/06/15/unity-static-factory-extension/#comment-135</link>
		<dc:creator>Derek</dc:creator>
		<pubDate>Fri, 16 Apr 2010 23:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.aspiringcraftsman.com/2009/06/unity-the-static-factory-extension/#comment-135</guid>
		<description>What did you change?  I&#039;m not able to spot the difference.</description>
		<content:encoded><![CDATA[<p>What did you change?  I&#8217;m not able to spot the difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JH</title>
		<link>http://lostechies.com/derekgreer/2009/06/15/unity-static-factory-extension/#comment-134</link>
		<dc:creator>JH</dc:creator>
		<pubDate>Fri, 16 Apr 2010 14:49:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.aspiringcraftsman.com/2009/06/unity-the-static-factory-extension/#comment-134</guid>
		<description>This article is excellent!! I had to make a couple slight adjustments to the Unity Extensions that I thought I would pass along.


public static IUnityContainer RegisterType(this IUnityContainer container, FactoryDelegate factoryMethod)
{
    container.Configure().RegisterFactory(factoryMethod);
    return container;
}

public static IUnityContainer RegisterType(this IUnityContainer container, FactoryDelegate factoryMethod,
                                                   LifetimeManager lifetimeManager)
{
    container.RegisterType(lifetimeManager).Configure().RegisterFactory(factoryMethod);
    return container;
}
</description>
		<content:encoded><![CDATA[<p>This article is excellent!! I had to make a couple slight adjustments to the Unity Extensions that I thought I would pass along.</p>
<p>public static IUnityContainer RegisterType(this IUnityContainer container, FactoryDelegate factoryMethod)<br />
{<br />
    container.Configure().RegisterFactory(factoryMethod);<br />
    return container;<br />
}</p>
<p>public static IUnityContainer RegisterType(this IUnityContainer container, FactoryDelegate factoryMethod,<br />
                                                   LifetimeManager lifetimeManager)<br />
{<br />
    container.RegisterType(lifetimeManager).Configure().RegisterFactory(factoryMethod);<br />
    return container;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
