Configurable binding between Host and WorkItems

Topics: CAB & Smart Client Software Factory
Jul 21, 2005 at 8:27 AM
originally posted by: inghak

I would like to bind which WorkItem goes into witch workspace as a part of the SolutionProfile configuration. Something like this:
<SolutionProfile Name="Variation1">
<Modules>
<ModuleInfo AssemblyFile="Module1.dll">
<WorkItem Name="WorkItem1" LinkTo="Workspace1"/> ... Add required binding information between shell and module here...
</ModuleInfo>
</Modules>

The way this is designed now, THE MODULE (init override) knows where the WorkItem should live at "design time". Doesn't this make the modules far less reusable? I would like this binding to occure at runtime, based on the configuration of a Solution Profile. In this way I could CONFIGURE different versions of the application for different usergroups. If I want to reuse a module in another Shell, why would I want the Module, at design time, to know what container (workspace) it should live in? Is there a reason for this "less reusable" design? Do you have any good tip to how I might use or override the current design to achieve this configurable binding between shell/host and module items?
Aug 2, 2005 at 8:02 AM
originally posted by: jhershauer

We're going to want the same type of functionality with our application. I figured we'd need to write our own CatalogReaderService (although providing a more robust one out of the box would be cool, too). At the very least, though, I'd like to see the ModuleInit.Start() method contain a Workspace string parameter. In turn, the ModuleLoaderService Initialize call would take an additional Workspace string parameter as well. We could then use whatever CatalogReader scheme we want to dynamically configure the application.

I love the CAB design and the reverse injection stuff (you guys kicked some serious butt on this project), but please don't stop short. Users of this block should be able to create XML module catalogs for complex applications without putting special placement logic in every single module.

Thanks,
Jeff