A couple of things

Sep 13, 2008 at 3:17 PM
I just started a new application using the Composite WPF and I like it very much. There's only two things that I don't understand yet.
1) The UnityContainer dependency. Why the UnityBootstrapper have a reference to IUnityContainer? I have to use Spring.NET as IoC Container and I remove Unity but it was not simple! Wouldn't be better if the bootsrapper have a reference to a generic IContainer interface with some simple methods like Resolve<T>, Register<T> and so on...? So everyone can implement this interface using his preferred IoC Fx. What do you think?
2) I like the DelegateCommands? They are the best way to communicate with Presenters/Views in other regions. But, they are not easy testable? Has anyone fill the same problem? How did you solve it?

BTW nice work.
Sep 14, 2008 at 12:49 AM
Edited Sep 14, 2008 at 12:50 AM
Re #1

(this is straight from the documentation supplied)

The Stock Trader Reference Implementation (Stock Trader RI) QuickStarts rely on the Unity Application Block as the container. The Composite Application Library itself is not container-specific, and you can use its services and patterns with other containers, such as Castle Windsor, StructureMap, and Spring.NET.

Container and Bootstrapper

The Composite Application Library comes with the Unity container; however, because the container is accessed through the IContainerFacade interface, the container can be replaced. To do this, your container will need to satisfy the IContainerFacade interface. Usually, if you are replacing the container, you will also need to provide your own container-specific bootstrapper. To provide this, examine the UnityBootstrapper to ensure the container is setup and registered with the services needed for the Composite Application Library.

Sep 14, 2008 at 7:53 AM
Hi PandaWood
I read the documentation and I replaced the UnityBootstapper with my SpringNetBootstrapper but it was not so simple as they say. What I want to say is that  IMHO i would be better if there is a GenericBootstrapper that use the IContainerFacade so the only thing that we have to do is to implement IContainerFacade.
BTW it's only my opinion, I would like to know if other have tried and how they feel doing it.

Sep 15, 2008 at 3:40 AM

I also have a different container besides IUnityContinaer, and could not find a simple or intuitive way to adapt my container. Could there be a sample of this somewhere, not an update to the sources/binaries, just an example? Like @emanuele, I understand the documentation of both Unity and CAL, but a simple example would be useful.

Thank @emanuele for your posting,

Andres Olivares
Sep 15, 2008 at 7:53 AM
Replacing the IoC container isn't indeed a simple task, but it is doable, I replaced the standard Unity container with a Spring.NET version in less than two hours. Writing a sample application that uses the container however takes a bit more time.

There is an implementation of the SpringBootstrapper waiting on my computer at home to be checked in to the CompositeWPFContrib project. I will also be writing a blogpost about it very soon.
I will post an update on the progress here with an URL to the blogpost.