Many Modules in One View

Topics: Web Client Software Factory
Apr 3, 2007 at 10:44 AM
Hi guys:

I have begun to use WCSF in my new project. I want to know how to implement Modules that are compound by other modules and use them in one view.

Apr 9, 2007 at 3:20 PM
Edited Apr 9, 2007 at 3:21 PM
Hi Luis, WCSF provides the notion of Foundational Modules. The primary purpose of a foundational module is to provide services to the other modules in the application. For example, a foundational module can contain code that provides instrumentation or even global business services that will be used by the every app module.

You can also have one business module “use” another business module. You can declare that dependency in the configuration file:

<module name="Customers" assemblyName="ModuleQuickstart.Customers" virtualPath="~/Customers">
    <dependency module="Navigation" />
Of course you will need to add a reference between those modules. When this happens, you can decouple your solution by having MyModule.Implementation and MyModule.Interface. Where MyModule.Interface is a class library that provides all the interfaces. This way you avoid the reference between two modules. And ModuleB references MyModule.Interface. The actual implementation of any interface that you might want to use will be resolved by ObjectBuilder at runtime.

Take a look at WCSF Help, topic “Inspecting the Software Factory”, there you can read about the design of the Composite Web Application block.

Let me know if this helps,
Ezequiel Jadib