<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Espresso Fueled Agile Development : Example Driven Design (Formerly TDD)</title><link>http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx</link><description>Tags: Example Driven Design (Formerly TDD)</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Unit testing SharePoint</title><link>http://blogs.msdn.com/mpuleio/archive/2008/08/22/unit-testing-sharepoint.aspx</link><pubDate>Sat, 23 Aug 2008 00:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8888899</guid><dc:creator>mpuleio</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8888899.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8888899</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8888899</wfw:comment><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/francischeung" target="_blank"&gt;Francis&lt;/a&gt; has an article on &lt;a href="http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx" target="_blank"&gt;Unit Testing SharePoint 2007 Applications&lt;/a&gt;&lt;/p&gt; &lt;p&gt;He also did a brownbag talk on this yesterday, which was very interesting and brought up a few big challenges and ways to work around them.&lt;/p&gt; &lt;p&gt;Enjoy&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8888899" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Converting the Composite Web Application Block to Unity - Actually Adding Unity</title><link>http://blogs.msdn.com/mpuleio/archive/2008/05/01/converting-the-composite-web-application-block-to-unity-actually-adding-unity.aspx</link><pubDate>Fri, 02 May 2008 02:44:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8447888</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8447888.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8447888</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8447888</wfw:comment><description>&lt;p&gt;This is the fifth post in a series. The other post include:  &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-intro.aspx"&gt;Converting the Composite Web Application Block to Unity - Intro&lt;/a&gt;.  &lt;li&gt;&lt;a href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-adding-an-icompositioncontainer.aspx" target="_blank"&gt;Converting the Composite Web Application Block to Unity - Adding an ICompositionContainer&lt;/a&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/mpuleio/archive/2008/04/09/converting-the-composite-web-application-block-to-unity-clean-up-icompositioncontainer.aspx"&gt;Converting the Composite Web Application Block to Unity - Clean Up ICompositionContainer&lt;/a&gt;  &lt;li&gt;&lt;a href="http://blogs.msdn.com/mpuleio/archive/2008/04/22/converting-the-composite-web-application-block-to-unity-ummmm-oooops.aspx"&gt;Converting the Composite Web Application Block to Unity - Ummmm...Oooops.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you want background, go read the earlier posts.  &lt;p&gt;Based upon feedback, I am making the source code available at &lt;a title="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity" href="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity" target="_blank"&gt;CWAB and Unity&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;First off, I have moved this little side project to source control, so I can avoid the re-work I had to do before I could write this part of the series. &lt;/p&gt; &lt;p&gt;Note to self :&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;NEVER work without a safety net.&amp;nbsp; That means both unit tests and source control. &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Ok.&amp;nbsp; Now that that is out of the way....&lt;/p&gt; &lt;p&gt;Let's go add Unity to CWAB, via EDD (formerly TDD).&lt;/p&gt; &lt;p&gt;How can we do this?&amp;nbsp; First, we need a test fixture.&amp;nbsp; So, I added &lt;span style="color: #2b91af"&gt;CompositionContainerFixture&lt;/span&gt; to the CompositeWeb.Tests project as an empty test fixture.&amp;nbsp; And then I added the following very simple test as a starting point:&lt;/p&gt; &lt;blockquote&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
&lt;span style="color: blue"&gt;public void &lt;/span&gt;UnityCompositionContainerIsICompositionContainer()
{
    UnityCompositionContainer container = &lt;span style="color: blue"&gt;new &lt;/span&gt;UnityCompositionContainer();
    &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsInstanceOfType(container, &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ICompositionContainer&lt;/span&gt;));
}
&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;This will allow me to write enough code to create the &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;class and ensure that it implements the right interface.&lt;/p&gt;
&lt;p&gt;Making the test compile forces me to create a new &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;class (I added it to the fixture as a nested class for the moment), and the test fails.&amp;nbsp; No problem.&amp;nbsp; I add the interface, implement it with methods that throw, and..... We are green again.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Next step, I copied the unit test &lt;span style="color: green"&gt;RootContainerParentIsNull&lt;/span&gt; over, changed its name to NewUnityContainerParentIsNull, updated it to create a new UnityCompositionContainer, and compiled and ran the test.&amp;nbsp; It passed, which is not idea;l, but I will leave it an move on, knowing it will be important later.&amp;nbsp; For the next test, I copied &lt;span style="color: green"&gt;ChildContainerHasParent &lt;/span&gt;changed its name to NewUnityContainerParentIsNull, updated it to create a new UnityCompositionContainer, and compiled and ran the test... Red. Just like we expected.&amp;nbsp; To make this work, I could do a bit of throw away work, or I could add Unity.&amp;nbsp; I feel like I can skip the simplest thing possible, because I know where I want to go.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;However, first, I'm doing a check-in.&amp;nbsp; I'll comment out the failing test, and sync up.&amp;nbsp; Just a sec.&lt;/p&gt;
&lt;p&gt;&amp;lt;click click&amp;gt;&lt;/p&gt;
&lt;p&gt;Ok, now To add Unity.&amp;nbsp; I grabbed the binaries from MSDN, dropped them in my tree in the Lib folder and we are good to go.&amp;nbsp; I added references in the CWAB projecct to Unity.DLL and ObjectBuilder2.DLL.&amp;nbsp; This means we have two completely separate DI systems as part of out code, which is awful.&amp;nbsp; However, it won't last too long.&lt;/p&gt;
&lt;p&gt;Now, we can make that test pass.&amp;nbsp; I added an IUnityContainer field to UnityCompositionContainer.&amp;nbsp; I then implemented a constructor to initialize it.&amp;nbsp; Then we needed to implement CreateChildContainer.&amp;nbsp; For this, the simplest thing was to create a new constructor for UnityCompositionContainer which takes a parent container as the only parameter.&amp;nbsp; After a little wire-up we end up with passing tests and this code:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;UnityCompositionContainer(&lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;parentContainer)
{
    Parent = parentContainer;
    wrappedContainer = parentContainer.wrappedContainer.CreateChildContainer();
}&lt;/pre&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;CreateChildContainer()
{
    &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;child = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;);
    &lt;span style="color: blue"&gt;return &lt;/span&gt;child;
}&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Fairly simple.&amp;nbsp; I will continue moving unit tests over, adapting them, and making them pass.&amp;nbsp; If there are any interesting deviations from normal, or new tests added, I'll let you know.&lt;/p&gt;
&lt;p&gt;&amp;lt;timewarp duration="a short while" /&amp;gt;&lt;/p&gt;
&lt;p&gt;That was actually fairly simple.&amp;nbsp; I copied the tests one at a time, replaced the container used with the UnityCompositionContainer, compiled, ran the tests, watched them fail due to NotImplementedExceptions, and fixed them.&amp;nbsp; Here's the test fixture:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;TestClass&lt;/span&gt;]
&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainerFixture
&lt;/span&gt;{
    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;UnityCompositionContainerIsICompositionContainer()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;container = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsInstanceOfType(container, &lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ICompositionContainer&lt;/span&gt;));
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;NewUnityContainerParentIsNull()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;container = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNull(container.Parent);
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;ChildContainerHasParent()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;parent = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();

        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;child = parent.CreateChildContainer();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreSame(parent, child.Parent);
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterTypeMappingOnRootContainer()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();

        root.RegisterType&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;IFoo &lt;/span&gt;resolvedIFoo = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), resolvedIFoo.GetType());
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterTypeMappingViaTypeObjects()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        root.RegisterType(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;), &lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;));

        &lt;span style="color: #2b91af"&gt;IFoo &lt;/span&gt;resolvedIFoo = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), resolvedIFoo.GetType());
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RequestingTypeMappingForUnmappedTypeReturnsRequestedType()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();

        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;resolvedFoo = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), resolvedFoo.GetType());
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    [&lt;span style="color: #2b91af"&gt;ExpectedException&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ArgumentException&lt;/span&gt;))]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;TypeMappingsMustBeTypeCompatible()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        root.RegisterType(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;IBar&lt;/span&gt;), &lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;));
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterMultipleTypeMappings()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();

        root.RegisterType&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;();
        root.RegisterType&amp;lt;&lt;span style="color: #2b91af"&gt;IBar&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Bar&lt;/span&gt;&amp;gt;();
        &lt;span style="color: #2b91af"&gt;IBar &lt;/span&gt;b = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IBar&lt;/span&gt;&amp;gt;();
        &lt;span style="color: #2b91af"&gt;IFoo &lt;/span&gt;f = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Bar&lt;/span&gt;), b.GetType());
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), f.GetType());
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RequestingTypeMappingOnChildReadsFromParent()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;parent = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;child = (&lt;span style="color: #2b91af"&gt;ICompositionContainer&lt;/span&gt;) parent.CreateChildContainer();

        parent.RegisterType&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), child.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;&amp;gt;().GetType());
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;ChildContainersCanOverrideParentTypeMapping()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;parent = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;child = (&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;) parent.CreateChildContainer();

        parent.RegisterType&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;();
        child.RegisterType&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Foo2&lt;/span&gt;&amp;gt;();

        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), parent.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;&amp;gt;().GetType());
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo2&lt;/span&gt;), child.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;IFoo&lt;/span&gt;&amp;gt;().GetType());
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanCreateChildContainer()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;container = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();

        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;child = container.CreateChildContainer();
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull(child);
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreNotSame(container, child);
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterInstance()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        root.RegisterInstance(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;), &lt;span style="color: #a31515"&gt;"foo"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"bar"&lt;/span&gt;);
        &lt;span style="color: blue"&gt;string &lt;/span&gt;returned = (&lt;span style="color: blue"&gt;string&lt;/span&gt;) root.Resolve(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;), &lt;span style="color: #a31515"&gt;"foo"&lt;/span&gt;);
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: #a31515"&gt;"bar"&lt;/span&gt;, returned);
    }


    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterInstanceViaGenericWithoutName()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;f1 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;();
        root.RegisterInstance&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;(f1);
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;returnedFoo = (&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;) root.Resolve(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;));
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(f1, returnedFoo);
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterInstanceViaGenericWithName()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;f1 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;();
        root.RegisterInstance&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"asdf"&lt;/span&gt;, f1);
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;returnedFoo = (&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;) root.Resolve(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;), &lt;span style="color: #a31515"&gt;"asdf"&lt;/span&gt;);
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(f1, returnedFoo);
    }


    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanResolveViaGenericWithoutName()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;f1 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;();
        root.RegisterInstance&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;(f1);
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;returnedFoo = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;();
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(f1, returnedFoo);
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;CanResolveInstanceViaGenericWithName()
    {
        &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;f1 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;();
        root.RegisterInstance&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"asdf"&lt;/span&gt;, f1);
        &lt;span style="color: #2b91af"&gt;Foo &lt;/span&gt;returnedFoo = root.Resolve&amp;lt;&lt;span style="color: #2b91af"&gt;Foo&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"asdf"&lt;/span&gt;);
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(f1, returnedFoo);
    }

    [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
    &lt;span style="color: blue"&gt;public void &lt;/span&gt;UnityCompositionContainerImplementsIDisposable()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;disposableContainer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;();
        &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull(disposableContainer &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IDisposable&lt;/span&gt;);
    }

    &lt;span style="color: green"&gt;// This test is commented out intentionally. The purpose of this test is to show 
    // that if you use the generic version of the RegisterTypeMapping method, if the
    // types aren't compatible it'll fail at compile time. 
    // 
    // This is exactly what happens. However that also means this file won't compile.
    // The test is left in as comments, if you wish to verify this then remove the comments,
    // watch the compile file, and then comment it out again.

    //[TestMethod]
    //public void GenericTypeMappingRegistrationEnforcesCompileTimeCompatibility()
    //{
    //    UnityCompositionContainer root = new UnityCompositionContainer();
    //    root.RegisterType&amp;lt;IBar, Foo&amp;gt;();
    //}
&lt;/span&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Notice, there are no tests for the Services collection.&amp;nbsp; This is intentional.&amp;nbsp; We will see if we can avoid implementing the methods at all.&lt;/p&gt;
&lt;p&gt;And here is the code to make those tests pass:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;ICompositionContainer&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;IDisposable
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;parent = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
    &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IUnityContainer &lt;/span&gt;wrappedContainer;

    &lt;span style="color: blue"&gt;public &lt;/span&gt;UnityCompositionContainer()
    {
        wrappedContainer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityContainer&lt;/span&gt;();
    }

    &lt;span style="color: blue"&gt;private &lt;/span&gt;UnityCompositionContainer(&lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;parentContainer)
    {
        Parent = parentContainer;
        wrappedContainer = parentContainer.wrappedContainer.CreateChildContainer();
    }

    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;Parent
    {
        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;parent; }
        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ parent = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }
    }

    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IServiceCollection &lt;/span&gt;Services
    {
        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NotImplementedException&lt;/span&gt;(); &lt;span style="color: green"&gt;// return services; 
        &lt;/span&gt;}
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterInstance(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;t, &lt;span style="color: blue"&gt;object &lt;/span&gt;instance)
    {
        wrappedContainer.RegisterInstance(t, instance);
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterInstance(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;t, &lt;span style="color: blue"&gt;string &lt;/span&gt;name, &lt;span style="color: blue"&gt;object &lt;/span&gt;instance)
    {
        wrappedContainer.RegisterInstance(t, name, instance);
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterInstance&amp;lt;TInterface&amp;gt;(TInterface instance)
    {
        wrappedContainer.RegisterInstance&amp;lt;TInterface&amp;gt;(instance);
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterInstance&amp;lt;TInterface&amp;gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;name, TInterface instance)
    {
        wrappedContainer.RegisterInstance&amp;lt;TInterface&amp;gt;(name, instance);
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterType&amp;lt;TRequested, TReturned&amp;gt;() &lt;span style="color: blue"&gt;where &lt;/span&gt;TReturned : TRequested
    {
        wrappedContainer.RegisterType&amp;lt;TRequested, TReturned&amp;gt;();
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterType(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;requested, &lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;returned)
    {
        wrappedContainer.RegisterType(requested, returned);
    }

    &lt;span style="color: blue"&gt;public object &lt;/span&gt;Resolve(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;typeOfItem)
    {
        &lt;span style="color: blue"&gt;return &lt;/span&gt;wrappedContainer.Resolve(typeOfItem);
    }

    &lt;span style="color: blue"&gt;public object &lt;/span&gt;Resolve(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;typeOfItem, &lt;span style="color: blue"&gt;string &lt;/span&gt;name)
    {
        &lt;span style="color: blue"&gt;return &lt;/span&gt;wrappedContainer.Resolve(typeOfItem, name);
    }

    &lt;span style="color: blue"&gt;public &lt;/span&gt;T Resolve&amp;lt;T&amp;gt;()
    {
        &lt;span style="color: blue"&gt;return &lt;/span&gt;wrappedContainer.Resolve&amp;lt;T&amp;gt;();
    }

    &lt;span style="color: blue"&gt;public &lt;/span&gt;T Resolve&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;string &lt;/span&gt;name)
    {
        &lt;span style="color: blue"&gt;return &lt;/span&gt;wrappedContainer.Resolve&amp;lt;T&amp;gt;(name);
    }

    &lt;span style="color: blue"&gt;public object &lt;/span&gt;BuildItem(&lt;span style="color: #2b91af"&gt;IBuilder&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;WCSFBuilderStage&lt;/span&gt;&amp;gt; builder, &lt;span style="color: blue"&gt;object &lt;/span&gt;item)
    {
        &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NotImplementedException&lt;/span&gt;();
    }

    &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;CreateChildContainer()
    {
        &lt;span style="color: #2b91af"&gt;UnityCompositionContainer &lt;/span&gt;child = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UnityCompositionContainer&lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;);
        &lt;span style="color: blue"&gt;return &lt;/span&gt;child;
    }

    &lt;span style="color: blue"&gt;public void &lt;/span&gt;Dispose()
    {
        wrappedContainer.Dispose();
        wrappedContainer = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
    }
}&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;We are now in a green state, time to check in.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Abusing Source Control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Agile teams usually check in very often.&amp;nbsp; Some teams check in every time they hit green.&amp;nbsp; I think that is a bit of overkill, unless you have a source control system with NO overhead.&amp;nbsp; I check in when I complete a feature or a story, and usually at a few good, green stopping points in the process, like I have been doing.&amp;nbsp; This was a good stopping point, and my next task is a bit risky, so this is a perfect time to check in.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is a long enough post, even though I didn't do all that much, that I will call it quits for today.&amp;nbsp; Next post, actually use the UnityCompositionContainer, and then nuke the old CompositionContainer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8447888" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Web+Client+Software+Factory/default.aspx">Web Client Software Factory</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET+AJAX/default.aspx">ASP.NET AJAX</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Unity/default.aspx">Unity</category></item><item><title>Smart Client Software Factory – April 2008 Release is available on MSDN</title><link>http://blogs.msdn.com/mpuleio/archive/2008/04/25/smart-client-software-factory-april-2008-release-is-available-on-msdn.aspx</link><pubDate>Sat, 26 Apr 2008 03:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8425078</guid><dc:creator>mpuleio</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8425078.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8425078</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8425078</wfw:comment><description>&lt;P&gt;The April 2008 release of the Smart Client Software Factory is now available at &lt;A href="http://msdn2.microsoft.com/en-us/library/aa480482.aspx" target=_blank&gt;&lt;FONT color=#0000ff&gt;http://msdn2.microsoft.com/en-us/library/aa480482.aspx&lt;/FONT&gt;&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This is a port of the last release&amp;nbsp;(May 2007,&amp;nbsp;if I recall&amp;nbsp;correctly)&amp;nbsp;to VS2008.&amp;nbsp; No new features were added.&amp;nbsp; A few bugs were fixed, and a number of work items from CodePlex were closed.&lt;/P&gt;
&lt;P&gt;This release supports Enterprise Library 3.1.&amp;nbsp; It does not support Enterprise Library 4.0.&amp;nbsp; If you want EntLib 4.0 (once it is released) you have the source code, and should be able to get it to work, if you really need to.&amp;nbsp; I would not recommend it, as you will end up with two containers (Unity and the CAB container), which means code bloat and challenges deciding where objects should go.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8425078" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Smart+Client+Software+Factory/default.aspx">Smart Client Software Factory</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Windows+Forms/default.aspx">Windows Forms</category></item><item><title>Converting the Composite Web Application Block to Unity - Ummmm...Oooops.</title><link>http://blogs.msdn.com/mpuleio/archive/2008/04/22/converting-the-composite-web-application-block-to-unity-ummmm-oooops.aspx</link><pubDate>Wed, 23 Apr 2008 02:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8417509</guid><dc:creator>mpuleio</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8417509.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8417509</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8417509</wfw:comment><description>&lt;P&gt;This is the forth post in a series. The other post include 
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-intro.aspx" mce_href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-intro.aspx"&gt;Converting the Composite Web Application Block to Unity - Intro&lt;/A&gt;. 
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-adding-an-icompositioncontainer.aspx" target=_blank mce_href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-adding-an-icompositioncontainer.aspx"&gt;Converting the Composite Web Application Block to Unity - Adding an ICompositionContainer&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/mpuleio/archive/2008/04/09/converting-the-composite-web-application-block-to-unity-clean-up-icompositioncontainer.aspx" mce_href="http://blogs.msdn.com/mpuleio/archive/2008/04/09/converting-the-composite-web-application-block-to-unity-clean-up-icompositioncontainer.aspx"&gt;Converting the Composite Web Application Block to Unity - Clean Up ICompositionContainer&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you want background, go read the earlier posts. 
&lt;P&gt;Based upon feedback, I am making the source code available at &lt;A title=http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity href="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity" target=_blank mce_href="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity"&gt;CWAB and Unity&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;In the last installment I wanted to remove the following from the ICompositionContainer:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRIKE&gt;static methods &lt;/STRIKE&gt;
&lt;LI&gt;&lt;STRIKE&gt;Builder &lt;/STRIKE&gt;
&lt;LI&gt;&lt;STRIKE&gt;Locator &lt;/STRIKE&gt;
&lt;LI&gt;&lt;STRIKE&gt;Containers &lt;/STRIKE&gt;
&lt;LI&gt;Services&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;We completed the first four. In this installment, we will remove the Services collection, replacing it with using RegisterInstance and Resolve. After that, we will compare our ICompositionContainer to IUnityContainer, see what else we need to do, and may even pull in Unity. 
&lt;H3&gt;Adding a few new methods&lt;/H3&gt;
&lt;P&gt;Before we do this, I want to add a generic overload to Resolve and one to RegisterInstance.&amp;nbsp; I like the way the generic calls on Unity look, compared to all the typeof() and casting we have done so far.&amp;nbsp; 
&lt;P&gt;I added the following tests, one at a time, and made them pass: 
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;TestMethod&lt;/SPAN&gt;]
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;CanRegisterInstanceViaGenericWithoutName()
{
    &lt;SPAN style="COLOR: #2b91af"&gt;ICompositionContainer &lt;/SPAN&gt;root = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TestableRootCompositionContainer&lt;/SPAN&gt;();
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;f1 = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;();
    root.RegisterInstance&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;&amp;gt;(f1);
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;returnedFoo = (&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;)root.Resolve(&lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;));
    &lt;SPAN style="COLOR: #2b91af"&gt;Assert&lt;/SPAN&gt;.AreEqual(f1, returnedFoo);
}

[&lt;SPAN style="COLOR: #2b91af"&gt;TestMethod&lt;/SPAN&gt;]
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;CanRegisterInstanceViaGenericWithName()
{
    &lt;SPAN style="COLOR: #2b91af"&gt;ICompositionContainer &lt;/SPAN&gt;root = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TestableRootCompositionContainer&lt;/SPAN&gt;();
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;f1 = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;();
    root.RegisterInstance&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: #a31515"&gt;"asdf"&lt;/SPAN&gt;, f1);
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;returnedFoo = (&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;)root.Resolve(&lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;), &lt;SPAN style="COLOR: #a31515"&gt;"asdf"&lt;/SPAN&gt;);
    &lt;SPAN style="COLOR: #2b91af"&gt;Assert&lt;/SPAN&gt;.AreEqual(f1, returnedFoo);
}


[&lt;SPAN style="COLOR: #2b91af"&gt;TestMethod&lt;/SPAN&gt;]
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;CanResolveViaGenericWithoutName()
{
    &lt;SPAN style="COLOR: #2b91af"&gt;ICompositionContainer &lt;/SPAN&gt;root = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TestableRootCompositionContainer&lt;/SPAN&gt;();
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;f1 = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;();
    root.RegisterInstance&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;&amp;gt;(f1);
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;returnedFoo = root.Resolve&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;&amp;gt;();
    &lt;SPAN style="COLOR: #2b91af"&gt;Assert&lt;/SPAN&gt;.AreEqual(f1, returnedFoo);
}

[&lt;SPAN style="COLOR: #2b91af"&gt;TestMethod&lt;/SPAN&gt;]
&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;CanResolveInstanceViaGenericWithName()
{
    &lt;SPAN style="COLOR: #2b91af"&gt;ICompositionContainer &lt;/SPAN&gt;root = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TestableRootCompositionContainer&lt;/SPAN&gt;();
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;f1 = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;();
    root.RegisterInstance&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: #a31515"&gt;"asdf"&lt;/SPAN&gt;, f1);
    &lt;SPAN style="COLOR: #2b91af"&gt;Foo &lt;/SPAN&gt;returnedFoo = root.Resolve&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Foo&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: #a31515"&gt;"asdf"&lt;/SPAN&gt;);
    &lt;SPAN style="COLOR: #2b91af"&gt;Assert&lt;/SPAN&gt;.AreEqual(f1, returnedFoo);
}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In making them pass, I added the following to the ICompositionContainer interface:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;T Resolve&amp;lt;T&amp;gt;();
T Resolve&amp;lt;T&amp;gt;(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;name);
&lt;SPAN style="COLOR: blue"&gt;void &lt;/SPAN&gt;RegisterInstance&amp;lt;TInterface&amp;gt;(TInterface instance);
&lt;SPAN style="COLOR: blue"&gt;void &lt;/SPAN&gt;RegisterInstance&amp;lt;TInterface&amp;gt;(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;name, TInterface instance);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;This will help a bit with the look, feel, and style of the code, now for the real work.&lt;/P&gt;
&lt;H3&gt;Removing the Services Collection&lt;/H3&gt;
&lt;P&gt;Why do we want to remove the Services collection?&amp;nbsp; Since Unity handles this sort of functionality, we can offload it entirely to Unity.&amp;nbsp; This will cut a bit of code out of our implementation. 
&lt;P&gt;Let's do this the simple way, (I like to call it hack and slash development) and just remove the Services collection from the ICompositionContainer interface.&amp;nbsp; This will result in a number of build errors (twenty or so, in fact).&amp;nbsp; However, we can fix each of them easily.&amp;nbsp; Any call to add a service becomes a RegisterInstance call, and any call to get a service becomes a Resolve call.&amp;nbsp; So, we will hack each problem until we are in a green state again.&amp;nbsp; The other option, for the less daring, is to search for all uses of Services, change them one at a time, and make sure we are green at each step.&amp;nbsp; Today, I am feeling brave (read: reckless, or overly caffeinated), so I took the other approach.&amp;nbsp; If I were pairing with someone, they would probably stop me. :-) 
&lt;P&gt;Once CWAB compiles, we still need to get the unit test library to compile.&amp;nbsp; &amp;lt;click click click&amp;gt; &amp;lt;swear&amp;gt; &amp;lt;click click click&amp;gt;.&amp;nbsp; The biggest challenge here is that Services.AddNew&amp;lt;T, IT&amp;gt; and RegisterType&amp;lt;IT, T&amp;gt; have the generic parameters in reversed order.&amp;nbsp; Aaargh. 
&lt;P&gt;Everything compiles, but I have a problem: 34 unit tests are failing.&amp;nbsp; This is not optimal.&amp;nbsp; Now, why are they failing?&amp;nbsp; After looking at the first few, it looks like I removed Services from the interface, and forgot to remove it from the CompositionContainer.&amp;nbsp; The result is that some tests are still using the ServicesCollection.&amp;nbsp; Oooops. 
&lt;P&gt;After removing Services from CompostionContainer, and getting everything to compile again, the test results are..... 
&lt;P&gt;Ouch!&amp;nbsp; 40 failing unit tests.&amp;nbsp; That is not good. 
&lt;P&gt;However, after some investigation, I can remove a couple of classes from our solution, as they are no longer necessary, and are just causing problems. 
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ServiceDependencyParameterResolver&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ProviderDependencyParameterResolver&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ProviderDependencyAttribute&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ServiceDependencyAttribute&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;After removing them, there is a bit of code cleanup required, to remove references.&amp;nbsp; All of the ServiceDependencyAttributes I replaced with ObjectBuilder DependencyAttributes.&amp;nbsp; The ProviderAttributes, I commented out for the moment.&lt;/P&gt;
&lt;P&gt;Wow. Progress. we are down to 37 failing tests. After looking at a few of them, where instances were not the same, I changed the SingletonPolicy in Resolve, and we are down to 24 failing tests. 
&lt;P&gt;Oh, gotta take a break. 
&lt;P&gt;&amp;lt;TimeWarp&amp;gt;Several Days Fly By&amp;lt;/TimeWarp&amp;gt; 
&lt;P&gt;I got interrupted from getting this working the other day.&amp;nbsp; Now, I am starting with broken tests.&amp;nbsp; I hate that.&amp;nbsp; I guess I was a bit too reckless.&amp;nbsp; Well, I have a few options: 
&lt;OL&gt;
&lt;LI&gt;I can continue and see this through 
&lt;LI&gt;I can timebox to a hour, and then roll back, and try again by taking smaller steps 
&lt;LI&gt;I can give up now and try again from the last known good state.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;I am going to opt for number 1.5: timebox to two hours, and depending on where I am, make a decision. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;timewarp duration="1 hour" /&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;@#$%^%$#@#$!!! &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;timewarp duration="a few days" reason="I needed to think about it" /&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have determined that I got a bit overzealous.&amp;nbsp; For the moment, the Services collection is necessary, and we can remove it once we have Unity in place to provide the necessary functionality.&amp;nbsp; It will stay as part of the interface, and will continue to provide functionality until we no longer need it.&amp;nbsp; However, it will eventually go away.&amp;nbsp; How did I arrive at this conclusion?&amp;nbsp; Well, I could not get the failing unit tests to pass in a reasonable amount of time.&amp;nbsp; Moving the functionality requires a lot more code than is really practical for throw-away code.&amp;nbsp; Oooops.&amp;nbsp; Everyone makes mistakes.&amp;nbsp; 
&lt;P&gt;As a result, I need to roll back a lot of changes.&amp;nbsp; Unfortunately, I did not back up everything (or do a check in) before starting down the path of removing the services collection.&amp;nbsp; Net result: I need to roll back everything, and then re-do the first half of this article. Double @#%$@%!&lt;/P&gt;
&lt;P&gt;I'll revert and then rework the code up to the section &lt;EM&gt;Removing the Services Collection&lt;/EM&gt;.&amp;nbsp; I'll get the code posted (&lt;A href="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity" target=_blank mce_href="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity"&gt;with the other source code&lt;/A&gt;) before I start the next installment.&lt;/P&gt;
&lt;P&gt;However, I wanted to post this article sooner rather than later, so folks don't think I have dropped the series.&amp;nbsp; Enjoy.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8417509" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Web+Client+Software+Factory/default.aspx">Web Client Software Factory</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET+AJAX/default.aspx">ASP.NET AJAX</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Unity/default.aspx">Unity</category></item><item><title>Converting the Composite Web Application Block to Unity - Clean Up ICompositionContainer</title><link>http://blogs.msdn.com/mpuleio/archive/2008/04/09/converting-the-composite-web-application-block-to-unity-clean-up-icompositioncontainer.aspx</link><pubDate>Thu, 10 Apr 2008 02:06:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8373500</guid><dc:creator>mpuleio</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8373500.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8373500</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8373500</wfw:comment><description>&lt;p&gt;This is the third post in a series. The other post include  &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-intro.aspx"&gt;Converting the Composite Web Application Block to Unity - Intro&lt;/a&gt;.  &lt;li&gt;&lt;a href="http://blogs.msdn.com/mpuleio/archive/2008/04/04/converting-the-composite-web-application-block-to-unity-adding-an-icompositioncontainer.aspx" target="_blank"&gt;Converting the Composite Web Application Block to Unity - Adding an ICompositionContainer&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you want background, go read the earlier posts.  &lt;p&gt;Based upon feedback, I am making the source code available at &lt;a title="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity" href="http://www.codeplex.com/websf/Wiki/View.aspx?title=CWAB%20and%20Unity" target="_blank"&gt;CWAB and Unity&lt;/a&gt;.  &lt;p&gt;In the last post, we started getting closer to my eventual goal. However, we still need to get rid of the static methods, Builder, Locator, Containers, and Services.&amp;nbsp; &lt;p&gt;Why?  &lt;ul&gt; &lt;li&gt;Static methods will make the necessary refactorings a pain in the.... well, a pain.  &lt;li&gt;Builder and Locator are handled by Unity internally, and we no longer need to deal with them directly.&amp;nbsp; &lt;li&gt;Containers will just be registered in the root container by module name, and we can use the WebClientApplication.FindModuleContainer method when we need to.&amp;nbsp; &lt;li&gt;Then there are CWAB Services.&amp;nbsp; These services will probably just go away.&amp;nbsp; Global Services are types that are Registered on the Root Container as singletons, and module services are types registered on the appropriate Container as singletons.&amp;nbsp; This will be really simple once we get Unity tied into the solution.&amp;nbsp; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Once we get rid of these items on the interface, we will want to add a few from the IUnityContainer, namely CreateChildContainer, and at least a few overloads (if not all of them) for RegisterType, RegisterInstance, and Resolve.  &lt;p&gt;Then, we will add a new type of container to the project, a CWABUnityContainer, and maybe a CompositionContainer factory.&amp;nbsp; The CWABUnityContainer will be a facade that implements ICompositionContainer and hides a real UnityContainer under the hood.&amp;nbsp; After that, things should be simple, allowing us to delete the old container and its code, and then do a bit of re-organizing.  &lt;blockquote&gt; &lt;p&gt;Note: Since this is a proof of concept, not what I would call "shipping code", I have turned off creating XML comments in the solution.&amp;nbsp; With the volume of changes, I was getting annoyed with all the warnings.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Removing Static Methods from CompositionContainer&lt;/strong&gt;  &lt;p&gt;There is only one static method on CompositionContainer, and it relies on the Locator property of the container object parameter to work.&amp;nbsp; In removing this, we can simplify the type, and remove the only dependency on the Locator property.&amp;nbsp; Let's change BuildItem to be a public, non-static method, and add it to the ICompositionContainer interface for a little while.  &lt;p&gt;Everything compiles.&amp;nbsp; Tests green (except for the ones I had commented out near the end of the last article.  &lt;p&gt;&lt;strong&gt;Removing ObjectBuilder specific parts of the interface&lt;/strong&gt;  &lt;p&gt;Let's do these one at a time, starting with Builder.&amp;nbsp; Comment it out in the interface, and....  &lt;p&gt;Two parts of the test fixture fail to compile:  &lt;ul&gt; &lt;li&gt;CreateRootContainerInitializesContainer needs a line commented out, since we changed the semantics of the method  &lt;li&gt;MockWebClientApplication needs a change to the ApplicationBuilder property to return null for the moment, with a comment to come back later.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Now we can compile, and run the tests, and we are green. However, I did notice something that I want to take care of before I go any further.... IWebClientApplication has an ApplicationBuilder and a PageBuilder, which can go away.&amp;nbsp; The Container will handle the responsibilities of these two properties.&amp;nbsp; If we delete these properties from the interface, the MockWebClientApplication and WebClientApplication, we get some compile errors in WebClientApplication, which lead us down an ugly path. Instead, we will leave these properties ONLY in WebClientApplication, and make a note to delete them later.  &lt;p&gt;Compile -&amp;gt; Good.&amp;nbsp; &lt;p&gt;Tests -&amp;gt; Green.  &lt;p&gt;&lt;strong&gt;Next Step, the Locator... &lt;/strong&gt; &lt;p&gt;If we remove it from the interface, we have compilation problems in WebClientApplication.BuildItemWithCurrentContext where we call BuildItem.&amp;nbsp; Let's roll back, change the signature of BuildItem to not have a locator, and the implementation to use the current container's locator, and then re-do the change.&amp;nbsp; Again, we will leave the property only on the CompositionContainer, even though it is not part of the interface, and add a few comments.&amp;nbsp; After a quick change to the test CreateRootContainerInitializesContainer, everything is green, and all tests pass.&amp;nbsp; &lt;p&gt;&lt;strong&gt;The Containers collection &lt;/strong&gt; &lt;p&gt;If we remove the Containers property from the ICompositionContainer interface, we have problems in the ModuleLoaderService.&amp;nbsp; The ModuleLoaderService understands how the CompositionContainer works, and can add new containers (one for each module) to the collection.&amp;nbsp; We also have challenges in the DefaultModuleContainerLocatorService, where we need to find a container in the collection.&amp;nbsp; If we think about how Unity works, both of these problems can go away if we find another another way to get child containers, and to create child containers.&amp;nbsp; Unity has the Resolve method, which can take a name parameter to get a named instance of an object (this handles getting a child container). We also have the CreateChildContainer method, to help with the creation, as well as RegisterInstance to give a created instance a name to use later.  &lt;p&gt;Let's roll back removing the Containers property, add the RegisterInstance and Resolve methods (that use a name) to the interface, test them, then add the CreateChildContainer method to the interface, and test it.&amp;nbsp; Once we have those pieces, we can re-work ModuleLoaderService and DefaultModuleContainerLocatorService to use the new methods.&amp;nbsp; Once we do all that, we can remove Containers from the ICompositionContainer interface without problems.  &lt;p&gt;So, let's start with RegisterInstance.&amp;nbsp; Since I know whatever implementation I come up with is a throw away implementation, and it only needs to work well enough NOT to break the existing code, I am going to keep this simple.&amp;nbsp; &lt;p&gt;First, a unit test added to CompositionContainerFixture:  &lt;blockquote&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
&lt;span style="color: blue"&gt;public void &lt;/span&gt;CanRegisterInstance()
{
    &lt;span style="color: #2b91af"&gt;TestableRootCompositionContainer &lt;/span&gt;root = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TestableRootCompositionContainer&lt;/span&gt;();
    root.RegisterInstance(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;), &lt;span style="color: #a31515"&gt;"foo"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"bar"&lt;/span&gt;);
    &lt;span style="color: blue"&gt;string &lt;/span&gt;returned = (&lt;span style="color: blue"&gt;string&lt;/span&gt;) root.Resolve(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;), &lt;span style="color: #a31515"&gt;"foo"&lt;/span&gt;);
    &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(&lt;span style="color: #a31515"&gt;"bar"&lt;/span&gt;, returned);
}&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;This tests for the behavior that Unity will have.&amp;nbsp; I will add the following to the ICompositionContainer to get it to compile: 
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;void &lt;/span&gt;RegisterInstance(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;t, &lt;span style="color: blue"&gt;string &lt;/span&gt;name, &lt;span style="color: blue"&gt;object &lt;/span&gt;instance);&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;And then add the stupid implementation:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterInstance(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;t, &lt;span style="color: blue"&gt;string &lt;/span&gt;name, &lt;span style="color: blue"&gt;object &lt;/span&gt;instance)
{
}&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Everything compiles, and the test fails, horribly.&lt;/p&gt;
&lt;p&gt;Now, to get the test to pass, RegisterInstance becomes:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt; _registeredInstances = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;();
&lt;span style="color: blue"&gt;public void &lt;/span&gt;RegisterInstance(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;t, &lt;span style="color: blue"&gt;string &lt;/span&gt;name, &lt;span style="color: blue"&gt;object &lt;/span&gt;instance)
{
    _registeredInstances.Add(&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;.Concat(t.FullName, name), instance);
}
&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Now, I know that is an ugly, bad, horrible monstrosity of an implementation.&amp;nbsp; It is also the simplest thing that will work. :-)&amp;nbsp; I also know I could use OB to do this, but again, I am keeping things simple, knowing I will throw away the implementation in a few hours.&lt;/p&gt;
&lt;p&gt;Resolve changes a bit too.&amp;nbsp; I added an overloaded version, and then made the unit test above pass by making the code look like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public object &lt;/span&gt;Resolve(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;typeOfItem)
{
    &lt;span style="color: blue"&gt;string &lt;/span&gt;temporaryID = &lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;.NewGuid().ToString();
    &lt;span style="color: blue"&gt;return &lt;/span&gt;Resolve(typeOfItem, temporaryID);
}

&lt;span style="color: blue"&gt;public object &lt;/span&gt;Resolve(&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;typeOfItem, &lt;span style="color: blue"&gt;string &lt;/span&gt;name)
{
    &lt;span style="color: blue"&gt;string &lt;/span&gt;key = &lt;span style="color: #2b91af"&gt;String&lt;/span&gt;.Concat(typeOfItem.FullName, name);
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(_registeredInstances.ContainsKey(key))
    {
        &lt;span style="color: blue"&gt;return &lt;/span&gt;_registeredInstances[key];
    }
    
    &lt;span style="color: #2b91af"&gt;PolicyList &lt;/span&gt;policies = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;PolicyList&lt;/span&gt;();
    policies.Set&amp;lt;&lt;span style="color: #2b91af"&gt;ISingletonPolicy&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SingletonPolicy&lt;/span&gt;(&lt;span style="color: blue"&gt;false&lt;/span&gt;), typeOfItem, name);
    policies.Set&amp;lt;&lt;span style="color: #2b91af"&gt;ICreationPolicy&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DefaultCreationPolicy&lt;/span&gt;(), typeOfItem, name);
    policies.Set&amp;lt;&lt;span style="color: #2b91af"&gt;IPropertySetterPolicy&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;PropertySetterPolicy&lt;/span&gt;(), typeOfItem, name);

    &lt;span style="color: blue"&gt;return &lt;/span&gt;_builder.BuildUp(
        _locator,
        typeOfItem,
        name,
        &lt;span style="color: blue"&gt;null&lt;/span&gt;,
        policies);
}
&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Compile.&amp;nbsp; Run Tests.&amp;nbsp; We are Green.&lt;/p&gt;
&lt;p&gt;Now to add CreateChildContainer.&amp;nbsp; First, we need a unit test:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre class="code"&gt;[&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]
&lt;span style="color: blue"&gt;public void &lt;/span&gt;CanCreateChildContainer()
{
    &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;container = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TestableRootCompositionContainer&lt;/span&gt;();
    
    &lt;span style="color: #2b91af"&gt;ICompositionContainer &lt;/span&gt;child = container.CreateChildContainer();
    &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull(child);
    &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreNotSame(container, child);
}
&lt;/pre&gt;&lt;/blockquote&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;To make that compile and then pass, I added CreateChildContainer to the interface, the class, and then implemented it.&amp;nbsp; Simple.&amp;nbsp; And we are Green again.&lt;/p&gt;
&lt;p&gt;Next step: remove from ICompositionContainer the Containers property, compile, and it fails.&amp;nbsp; This requires minor tweaking to the ModuleLoaderService and DefaultModuleContainerLocatorService. Now, we compile.&amp;nbsp; However, the Containers property is still on the CompositionContainer.&amp;nbsp; After we remove it from there, we have to fix a lot of unit tests so that they compile (and removing a few that no longer make sense, semantically).&amp;nbsp; This is simple, but tedious.&amp;nbsp; &amp;lt;click&amp;gt; &amp;lt;click&amp;gt; &amp;lt;swearing&amp;gt; &amp;lt;click&amp;gt; &amp;lt;click&amp;gt; ...&lt;/p&gt;
&lt;p&gt;Ok, we are now compiling and all unit tests pass.&lt;/p&gt;
&lt;p&gt;I need a break, so we will cut this a little shorter than I had hoped.&lt;/p&gt;
&lt;p&gt;In this installment I wanted to remove the following from the ICompositionContainer:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;static methods 
&lt;li&gt;Builder 
&lt;li&gt;Locator 
&lt;li&gt;Containers 
&lt;li&gt;Services&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;We completed the first four. In the next installment, we will remove the Services collection, replacing it with using RegisterInstance and Resolve. After that, we will compare our ICompositionContainer to IUnityContainer, see what else we need to do, and may even pull in Unity.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8373500" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Web+Client+Software+Factory/default.aspx">Web Client Software Factory</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET+AJAX/default.aspx">ASP.NET AJAX</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Unity/default.aspx">Unity</category></item><item><title>Unity Shipped</title><link>http://blogs.msdn.com/mpuleio/archive/2008/04/08/unity-shipped.aspx</link><pubDate>Wed, 09 Apr 2008 02:06:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8370334</guid><dc:creator>mpuleio</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8370334.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8370334</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8370334</wfw:comment><description>&lt;p&gt;I am a little late to the party, but &lt;a href="http://www.codeplex.com/unity" target="_blank"&gt;Unity&lt;/a&gt; shipped last week.&lt;/p&gt; &lt;p&gt;Here are a few other posts about it:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Grigori: &lt;a href="http://blogs.msdn.com/agile/archive/2008/04/04/unity-di-container-1-0-shipped.aspx"&gt;Unity DI container 1.0 shipped!&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Chris: &lt;a href="http://www.tavaresstudios.com/Blog/post/Unity-10-is-released!.aspx"&gt;Unity 1.0 is released!&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I have used Unity in an internal project here at p&amp;amp;p, as well as a proof of concept re-write of CWAB using Unity.&amp;nbsp; The interface is clean and simple.&amp;nbsp; It does what you want.&amp;nbsp; Configuration is easy.&amp;nbsp; It makes unit testing simpler via de-coupling. &lt;strong&gt;&lt;em&gt;Unity rocks.&amp;nbsp; &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8370334" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Data-mining for Code Quality Metrics</title><link>http://blogs.msdn.com/mpuleio/archive/2008/04/02/data-mining-for-code-quality-metrics.aspx</link><pubDate>Thu, 03 Apr 2008 02:30:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8352663</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/8352663.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=8352663</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=8352663</wfw:comment><description>&lt;p&gt;I spent two weeks between full time projects (still working on the 2 part time projects I am on) looking back at the build logs from the past 6 months (or so) trying to figure out what metrics we have, what we should track going forward, and what goals we should have for these metrics.&amp;nbsp;&amp;nbsp; I came up with some interesting findings.&lt;/p&gt; &lt;p&gt;First, overall unit test code coverage was OK, but not as high as I would like on my projects.&amp;nbsp; Of course, these numbers included generated code, view code, and other things that I usually filter out.&amp;nbsp; Also coverage was fairly flat.&amp;nbsp; For the most part, as we added code, we added tests.&amp;nbsp; This, I think is much better than one of the alternatives, having coverage drop over the course of the project.&lt;/p&gt; &lt;p&gt;Here is coverage for the Application Blocks in WCSF, without axis labels.&amp;nbsp; The Y axis starts at 76% (not zero).&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mpuleio/WindowsLiveWriter/CodeQualityMetrics_BA15/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="589" alt="image" src="http://blogs.msdn.com/blogfiles/mpuleio/WindowsLiveWriter/CodeQualityMetrics_BA15/image_thumb_1.png" width="1028" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You will see that there was a noticeable drop in coverage part way through the project. That was when we added a new library of AJAX controls.&amp;nbsp; Before the change was made we knew this would happen and accepted the risk.&amp;nbsp; I also worked with the testers on my team to mitigate the risk via more acceptance tests and careful code reviews. And after the change, we trended up, slowly, over time.&lt;/p&gt; &lt;p&gt;In addition to watching coverage over time, I was able to come up with a few indices to watch going forward.&amp;nbsp; Thanks to &lt;a href="http://www.ndepend.com/" target="_blank"&gt;NDepend&lt;/a&gt;, a little bit of work parsing build logs, and Linq, I was able to create seven indices, three of which I will be watching closely on future projects:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Cyclomatic Complexity&lt;/li&gt; &lt;li&gt;Afferent Coupling&lt;/li&gt; &lt;li&gt;Efferent Coupling&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you want a definition for any of these, check out the NDepend site.&amp;nbsp; The index for each of these is the average of the top 10 worst values by type.&lt;/p&gt; &lt;p&gt;Here is a graph of these indices over time for another, un-named project (without the axis labels)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mpuleio/WindowsLiveWriter/CodeQualityMetrics_BA15/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="772" alt="image" src="http://blogs.msdn.com/blogfiles/mpuleio/WindowsLiveWriter/CodeQualityMetrics_BA15/image_thumb.png" width="1021" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;You can see that the first few builds did not have NDepend hooked up properly.&amp;nbsp; Then everything tracks along, relatively stable until about 40% through the project.&amp;nbsp; The Dev Lead on the project was able to tell me what happened on the day that the Cyclomatic Complexity dropped drastically.&amp;nbsp; It was a big change to simplify things.&lt;/p&gt; &lt;p&gt;Do these graphs, numbers, and indices (and all the others that I pulled from the data, but did not share yet) tell me the whole story as far as code quality?&amp;nbsp; &lt;em&gt;&lt;strong&gt;Of course not&lt;/strong&gt;&lt;/em&gt;.&amp;nbsp; However, these can all be used as indicators.&amp;nbsp; If complexity trends sharply up over time, there may be a problem we need to investigate.&amp;nbsp; If it stays low, there can still be other problems hidden.&amp;nbsp; However, a little information is better than none.&lt;/p&gt; &lt;p&gt;Now, on to the next project...&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8352663" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Agile/default.aspx">Agile</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Web+Client+Software+Factory/default.aspx">Web Client Software Factory</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET+AJAX/default.aspx">ASP.NET AJAX</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Web Client Software Factory February 2008 Ships!</title><link>http://blogs.msdn.com/mpuleio/archive/2008/02/28/web-client-software-factory-february-2008-ships.aspx</link><pubDate>Thu, 28 Feb 2008 22:25:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7937016</guid><dc:creator>mpuleio</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/7937016.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=7937016</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=7937016</wfw:comment><description>&lt;p&gt;I know that folks have been reading about the Web Client Software Factory on Blaine's blog and on Glenn's blog.&amp;nbsp; Blaine posted about what we planned to include, back in December with &lt;a href="http://blogs.msdn.com/blaine/archive/2007/12/13/next-version-of-web-client-software-factory-wcsf.aspx"&gt;Next version of Web Client Software Factory (WCSF)&lt;/a&gt;.&amp;nbsp; Glenn had the post at the end of January, &lt;a href="http://blogs.msdn.com/gblock/archive/2008/01/31/web-client-2-0-closer-than-you-think.aspx"&gt;Web Client 2.0 closer than you think&lt;/a&gt;, and &lt;a href="http://blogs.msdn.com/gblock/archive/2008/02/22/web-client-2-0-what-s-the-hold-up.aspx"&gt;Web Client 2.0, what's the hold up?&lt;/a&gt;&amp;nbsp; &lt;/p&gt; &lt;h2&gt;So, what is in the latest version of the Web Client Software Factory?&lt;/h2&gt; &lt;p&gt;Here is a quick blurb from the front page of our docs, with my comments in &lt;font color="#0000ff"&gt;Blue&lt;/font&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The February 2008 release of the Web Client Software Factory is an update to the June 2007 release. The following are the major changes:  &lt;ul&gt; &lt;li&gt;&lt;b&gt;Added user interface responsiveness guidance&lt;/b&gt;. The guidance includes documentation, Web controls, QuickStarts, and a new reference implementation that demonstrate how to incorporate Microsoft ASP.NET AJAX technologies in your Web applications to provide a richer user interface experience.  &lt;li&gt;&lt;b&gt;Added support for &lt;/b&gt;&lt;b&gt;the &lt;/b&gt;&lt;b&gt;Model-View-Presenter pattern &lt;/b&gt;&lt;b&gt;in&lt;/b&gt; &lt;b&gt;user controls and master pages&lt;/b&gt;. The Composite Web Application Block includes a new Dependency Injection mechanism that facilitates the implementation of the Model-View-Presenter pattern in Web controls and master pages. The guidance package also includes new recipes that help developers create master pages and user controls that implement the Model-View-Presenter pattern. By using the Model-View-Presenter, developers can extend the testability surface to user controls and master pages. &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;Dependency Injection also works in ASMX Web Services hosted in a WCSF web application project&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;User controls can be&lt;/b&gt; &lt;b&gt;reused across modules&lt;/b&gt;. Developers can build Web pages made up of user controls from different modules. &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;There is an example of this in the Order Management Reference Implementation&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;Updated the Composite Web Application Block&lt;/b&gt;. The main changes include the following:  &lt;ul&gt; &lt;li&gt;Improved performance  &lt;li&gt;Support for services registration through configuration  &lt;li&gt;Support for type mapping for dependency injection &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;Type mapping was a no-brainer to add.&amp;nbsp; We also needed it to show a few of the deeper concepts around MVP.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;The performance improvements are the part of how the new &lt;a href="http://www.codeplex.com/unity"&gt;Unity project&lt;/a&gt; works &lt;em&gt;deep&lt;/em&gt; under the hood.&amp;nbsp; &lt;a href="http://www.tavaresstudios.com/Blog/"&gt;Chris Tavares&lt;/a&gt; and worked with the WCSF team on the performance enhancements.&amp;nbsp; Later, Chris went to start the Unity project, which has evolved into a great tool from what I have seen.&amp;nbsp; I know the next question is "When will WCSF support Unity?"&amp;nbsp; My answer is as soon as we can do a complete re-write.&amp;nbsp; Out of the box, Unity provides a lot of functionality that CWAB provides.&amp;nbsp; To properly use Unity, we would need to throw out a lot of the CWAB code, and re-do it.&amp;nbsp; &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;The ability to add a service via config was requested by the community, and is shown in the Order Management Reference Implementation.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;Updates to the &lt;/b&gt;&lt;b&gt;Add Business Module and Add Foundational Module recipes&lt;/b&gt;. These recipes now include a new option to create a separate project for the modules’ public interface.  &lt;li&gt;&lt;b&gt;Updated the patterns &lt;/b&gt;&lt;b&gt;documentation &lt;/b&gt;&lt;b&gt;topics&lt;/b&gt;. The main changes include two new pattern description topics, Inversion of Control and Module Interface Separation, and it updates to the Model-View-Presenter topic.  &lt;li&gt;&lt;b&gt;Included additional guidance for &lt;/b&gt;&lt;b&gt;several&lt;/b&gt; &lt;b&gt;technical concepts&lt;/b&gt;. The technical concepts covered are views testability, modularity, autocomplete, validation, and search. The guidance consists of documentation, QuickStarts, Web controls, and How-to topics. &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;These concepts were shipped previously as "Bundles" on our CodePlex community.&amp;nbsp; We will be releasing new, updated VS2008 versions of these bundles on MSDN in the near future, but all the content is in the factory.&amp;nbsp; The bundles are so folks can get a small taste and look at a single feature or concept in isolation.&lt;/font&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;Added support for Visual Studio 2008 to the guidance package&lt;/b&gt;. &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;VS2008 and and .NET 3.5 support was asked for very loudly by customers.&lt;/font&gt;&lt;/p&gt; &lt;h2&gt;Testing Guidance&lt;/h2&gt; &lt;p&gt;Something we do not talk about enough is the fact that we are releasing some guidance on how to test web applications.&amp;nbsp; First, since we do most development via &lt;strike&gt;TDD&lt;/strike&gt; EDD (Example Driven Development), we have quite a bit in the way of unit tests.&amp;nbsp; There are a few exceptions, where we intentionally do not include unit tests as we do not want to clutter a QuickStart example with another concept that may hinder understanding of what the QuickStart is about. &lt;/p&gt; &lt;p&gt;We are also shipping acceptance tests.&amp;nbsp; In a few projects, these acceptance tests are manual test scripts in the form of a Visual Studio Manual Test.&amp;nbsp; In others, we have completely automated the acceptance tests using &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;&amp;lt;TheLawyersMadeMeSayIt&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;Note: this is a link to an external Web site that provides software that can be used to write acceptance tests. Please note that Microsoft is not responsible for the content of external Internet sites. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;&amp;lt;/TheLawyersMadeMeSayIt&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the &lt;a href="http://watin.sourceforge.net/"&gt;WatiN (Web Application Testing in .NET)&lt;/a&gt;.&amp;nbsp; &lt;/p&gt; &lt;p&gt;To compile the test projects and run the tests, you will need VS2008 Professional or Team System, and to download the WatiN binaries, and copy the DLLs to the Lib folder (which our help describes with more info).&amp;nbsp; The upside is that anyone can see how we are doing functional/acceptance testing&amp;nbsp; of our sample applications.&amp;nbsp; Of course, there is a lot more to testing than just acceptance testing, but it is a start.&lt;/p&gt; &lt;h2&gt;Other resources&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;The &lt;a href="http://msdn.com/webclientfactory"&gt;WCSF page on MSDN&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.codeplex.com/websf"&gt;The WCSF Community on CodePlex&lt;/a&gt; &lt;/li&gt; &lt;li&gt;If you just want to peruse the docs, check out the &lt;a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=websf&amp;amp;ReleaseId=1563"&gt;WCSF Documentation download page&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You will also want to check out what Blaine and Glenn say about the release:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Blaine's post: &lt;a href="http://blogs.msdn.com/blaine/archive/2008/02/28/web-client-software-factory-shipped.aspx"&gt;Web Client Software Factory Shipped&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Glenn's post: &lt;a href="http://blogs.msdn.com/gblock/archive/2008/02/28/web-client-software-factory-2-0-shipped.aspx"&gt;Web Client Software Factory 2.0 Shipped&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7937016" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Web+Client+Software+Factory/default.aspx">Web Client Software Factory</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/ASP.NET+AJAX/default.aspx">ASP.NET AJAX</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Unit testing is evolving</title><link>http://blogs.msdn.com/mpuleio/archive/2007/09/20/unit-testing-is-evolving.aspx</link><pubDate>Fri, 21 Sep 2007 02:01:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5020589</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/5020589.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=5020589</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=5020589</wfw:comment><description>&lt;p&gt;&lt;a href="http://jamesnewkirk.typepad.com/posts/" target="_blank"&gt;Jim Newkirk&lt;/a&gt; (of nUnit fame and one of the Microsoft folks behind &lt;a href="http://www.CodePlex.com"&gt;www.CodePlex.com&lt;/a&gt; ) has been blogging about unit testing in forever ( most recently: &lt;a href="http://jamesnewkirk.typepad.com/posts/2007/09/why-you-should-.html" target="_blank"&gt;Why you should not use Setup and Teardown in NUnit&lt;/a&gt; ).&amp;nbsp; &lt;/p&gt; &lt;p&gt;Now, Jim and &lt;a href="http://www.agileprogrammer.com/dotnetguy" target="_blank"&gt;Brad Wilson&lt;/a&gt; are putting action to his words and codifying lessons learned over the years by developing &lt;a href="http://www.codeplex.com/xunit" target="_blank"&gt;xUnit.Net&lt;/a&gt;.&amp;nbsp; Check out Jim's intro to this new tool at "&lt;a href="http://jamesnewkirk.typepad.com/posts/2007/09/announcing-xuni.html" target="_blank"&gt;Announcing xUnit.net&lt;/a&gt;".&lt;/p&gt; &lt;p&gt;Personally, I'll try using the shipping version on my own personal projects.&amp;nbsp; At this point, it will probably not effect what I do at p&amp;amp;p.&lt;/p&gt; &lt;p&gt;Check it out and enjoy.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;[Note: I added the testing flag since xUnit.NET claims to be extensible into an acceptance testing framework.&amp;nbsp; Not that I consider EDD testing.]&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5020589" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Using the Testable Object Pattern</title><link>http://blogs.msdn.com/mpuleio/archive/2007/04/03/using-the-testable-object-pattern.aspx</link><pubDate>Tue, 03 Apr 2007 19:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2019287</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/2019287.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=2019287</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=2019287</wfw:comment><description>&lt;P&gt;Wow.&amp;nbsp; Five posts on unit testing and/or EDD in a row... this has got to be a record.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://www.agileprogrammer.com/dotnetguy" target=_blank mce_href="http://www.agileprogrammer.com/dotnetguy"&gt;Brad&lt;/A&gt; has a great post on the &lt;A class="" href="http://www.agileprogrammer.com/dotnetguy/archive/2007/04/03/22553.aspx" target=_blank mce_href="http://www.agileprogrammer.com/dotnetguy/archive/2007/04/03/22553.aspx"&gt;Testable Object Pattern&lt;/A&gt;.&amp;nbsp; I've used this pattern on my own code without realizing it, as I also don't like "magic" setup and tear down methods that rely on a particular implementation of a unit testing framework.&lt;/P&gt;
&lt;P&gt;Enjoy writing those&amp;nbsp;examples first.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2019287" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category></item><item><title>Design as If Testing Matters </title><link>http://blogs.msdn.com/mpuleio/archive/2007/03/29/design-as-if-testing-matters.aspx</link><pubDate>Thu, 29 Mar 2007 20:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1989540</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/1989540.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=1989540</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=1989540</wfw:comment><description>&lt;P&gt;To continue with the string of unit testing and Example Driven Design posts, here is another one:&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://agileprogrammer.com/eightytwenty/" target=_blank mce_href="http://agileprogrammer.com/eightytwenty/"&gt;Gordon&amp;nbsp;Weakliem&lt;/A&gt;&amp;nbsp;has a&amp;nbsp;post about &lt;A class="" href="http://www.agileprogrammer.com/eightytwenty/archive/2007/03/27/22528.aspx" target=_blank mce_href="http://www.agileprogrammer.com/eightytwenty/archive/2007/03/27/22528.aspx"&gt;designing APIs with testing in mind&lt;/A&gt;, which links to a&amp;nbsp;James Robertson post on &lt;A class="" href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&amp;amp;printTitle=API_Design_as_if_Unit_Testing_Mattered&amp;amp;entry=3352427466" target=_blank mce_href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&amp;amp;printTitle=API_Design_as_if_Unit_Testing_Mattered&amp;amp;entry=3352427466"&gt;API Design as if Unit Testing Mattered&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The idea, distilled, is this:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;If your API is&amp;nbsp;hard to unit test, how in the heck are your users going to be able to use it?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1989540" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category></item><item><title>Unit Testing Rules</title><link>http://blogs.msdn.com/mpuleio/archive/2007/03/28/unit-testing-rules.aspx</link><pubDate>Wed, 28 Mar 2007 20:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1978292</guid><dc:creator>mpuleio</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/1978292.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=1978292</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=1978292</wfw:comment><description>&lt;P&gt;One of the internal Microsoft discussion lists on unit testing and EDD (TDD) had a thread where a person new to unit testing asked a couple of really good questions.&amp;nbsp; In response, someone posted a link to an intersting post by Michael Feathers on &lt;SPAN class=ts&gt;&lt;A class="" href="http://www.artima.com/weblogs/viewpost.jsp?thread=126923" target=_blank mce_href="http://www.artima.com/weblogs/viewpost.jsp?thread=126923"&gt;A Set of Unit Testing Rules&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=ts&gt;I like these rules, and am going to share them with my team as suggested guidelines to make sure we are consistent.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=ts&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1978292" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category></item><item><title>Unit Testing will be in Visual Studio Pro</title><link>http://blogs.msdn.com/mpuleio/archive/2007/03/27/unit-testing-will-be-in-visual-studio-pro.aspx</link><pubDate>Tue, 27 Mar 2007 22:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1967102</guid><dc:creator>mpuleio</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/1967102.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=1967102</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=1967102</wfw:comment><description>&lt;P&gt;It was publically announced today on &lt;A class="" href="http://blogs.msdn.com/nnaderi/default.aspx" target=_blank mce_href="http://blogs.msdn.com/nnaderi/default.aspx"&gt;Naysawn Naderi's blog &lt;/A&gt;that &lt;A class="" href="http://blogs.msdn.com/nnaderi/archive/2007/03/27/unit-testing-trickling-into-pro.aspx" target=_blank mce_href="http://blogs.msdn.com/nnaderi/archive/2007/03/27/unit-testing-trickling-into-pro.aspx"&gt;Unit Testing will be in the Pro SKU of the next version of Visual Studio&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;This is fantastic news that I am very excited to share.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1967102" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category></item><item><title>Creating a List of Examples (a.k.a. a Test List)</title><link>http://blogs.msdn.com/mpuleio/archive/2007/03/27/creating-a-list-of-examples-a-k-a-a-test-list.aspx</link><pubDate>Tue, 27 Mar 2007 20:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1965800</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/1965800.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=1965800</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=1965800</wfw:comment><description>&lt;P&gt;&lt;A class="" href="http://www.agileprogrammer.com/oneagilecoder/archive/2007/03/24/22517.aspx" target=_blank mce_href="http://www.agileprogrammer.com/oneagilecoder/archive/2007/03/24/22517.aspx"&gt;Brian has a great post on how to get an EDD (Example Driven Design) coding session&amp;nbsp;started with a list of examples&lt;/A&gt;.&amp;nbsp; Of course, Brian uses the terms "TDD" and "Creating a Test List", but the idea is the same.&lt;/P&gt;
&lt;P mce_keep="true"&gt;[Author's Note: Because TDD (Test Driven&amp;nbsp;Design)&amp;nbsp;&amp;nbsp;is such an overloaded term, and misleads people into thinking about TESTING rather than DESIGNING, I have stopped using the term.&amp;nbsp; EDD is a much better description of the process and the mindset.&amp;nbsp; Testing is just a great, beneficial side effect of the process.]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1965800" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Extreme+Programming/default.aspx">Extreme Programming</category></item><item><title>Announcing: Web Client Software Factory Webcast</title><link>http://blogs.msdn.com/mpuleio/archive/2007/03/19/announcing-web-client-software-factory-webcast.aspx</link><pubDate>Tue, 20 Mar 2007 04:49:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1915943</guid><dc:creator>mpuleio</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mpuleio/comments/1915943.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mpuleio/commentrss.aspx?PostID=1915943</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mpuleio/rsscomments.aspx?PostID=1915943</wfw:comment><description>&lt;p&gt;Through a few, lucky quirks of fate, &lt;a href="http://blogs.msdn.com/blaine/" target="_blank"&gt;Blaine Wastell&lt;/a&gt; and I get to do an &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032331981&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US" target="_blank"&gt;MSDN webcast about the Web Client Software Factory&lt;/a&gt; on Wednesday, March 21 at 10:00AM PST.&amp;nbsp; I'm looking forward to it.&lt;/p&gt; &lt;p&gt;If you are interested in an overview of the factory, a few demos, and an in-depth (time permitting) review of unit testing with the View-Presenter pattern, and an overview of Page Flow, &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032331981&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US" target="_blank"&gt;you can register for the show&lt;/a&gt;&amp;nbsp;here :&lt;/p&gt; &lt;p&gt;&lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032331981&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US" target="_blank"&gt;MSDN Webcast: How to Use the Web Client Software Factory (Level 300)&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1915943" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Example+Driven+Design+_2800_Formerly+TDD_2900_/default.aspx">Example Driven Design (Formerly TDD)</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Development+Tools/default.aspx">Development Tools</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/patterns+_2600_amp_3B00_+practices/default.aspx">patterns &amp;amp; practices</category><category domain="http://blogs.msdn.com/mpuleio/archive/tags/Web+Client+Software+Factory/default.aspx">Web Client Software Factory</category></item></channel></rss>