Unity for CAB like functionality

Apr 10, 2008 at 7:04 PM
i am confused on

1. Is Unity same(next version )of ObjectBuilder? OR unity is different and ObjectBuilder2 is different?

2. Can i use unity to have CAB like functionality as mentioned below

a) have a CAB like conifg file entry for loading my plugins
<module name= "some1.dll"/>
<module name= "some2.dll"/>

and container loads/instantiate all IMyPluging classes from DLLS and call Initalize function on loading.

b) CAB like runtime container (context) workItem.
so that </modules> specified are loaded in same context/workitem

c) All loaded modules have to injected with WorkItem/context instance under which they are loaded. and the injection RootWorkItem (which is the parent of all context). so that if module need any thing they can get it from there workItem instance injected.

d)EventBroker. Local and global events. local are available to plugins in same context/workitem. Global are available to all WorkItems
Apr 11, 2008 at 2:31 PM
ObjectBuilder2 is a kind of IoC container building framework and Unity is a container built up on front of it.

I think for the similiar to CAB functionality with modules you need to implement an unity extension that reads config file, looks through all types in modules recognizing IMyPlugging types and registering them into a container.

There is a simple Event Broker implementation which comes as a sample with Unity 1.0

Frankly speaking you still can leverage Smart Client Software Factory to achieve all points you have mentioned above because ObjectBuilder there is responsable for injecting dependencies between Smart Parts and Work Items and it works well. I quess the only point to implement your own factory like SCSF is having something that makes impossible SCSF to use for you. All features above are time consuming enough things in terms of development.
Apr 11, 2008 at 3:44 PM
You can lso check out the Prism project http://www.codeplex.com/prism, which is a pilot project out there to create a new CAB framework for WPF. It's got some good ideas in the spikes that look at points b,c, and d.