integrating modules

Greetings,

I’m developing an web application using ASP.NET 2.0. This application consists of several modules. The development activity is going in a modular way (i.e. module by module), and I need to integrate these modules with each other. Is there any better / suggested way to integrate the modules with each other?

  1. I do not want to refer the modules directly
  2. I should be able to d-link / link the modules easily with out any major changes to the code
  3. I should be able to host the individual modules (in this case some of the functions depended on the other modules may be disabled or functionality is limited)

Please suggest best way of doing this.

Best Regards,

Anand

[2057 byte] By [anandss] at [2007-12-24]
# 1
Create a shared assembly that contains only Interfaces. Make sure that all calls between the modules are done via Interfaces. This will allow for greater flexibility for reuse and unit testing. It is a little more work upfront, but it will pay dividends in future work.

Plus the separate modules that build off of the interfaces are not beholden to one class/object in a common assembly. They are only fulfilling a contract. So new modules in the future are not tied to objects...just interfaces.

OmegaMan at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 2

Sounds like you're talking about an add-in architecture. Keeping one assembly at arms length to the the main assembly is called "Sandboxing". Shawn Farkas (shawnfa) has some good articles and blog entries on add-ins and security and sandboxing in both .NET 1.x and 2.0.

OmegaMan wrote:
Create a shared assembly that contains only Interfaces. Make sure that all calls between the modules are done via Interfaces. This will allow for greater flexibility for reuse and unit testing. It is a little more work upfront, but it will pay dividends in future work.

Plus the separate modules that build off of the interfaces are not beholden to one class/object in a common assembly. They are only fulfilling a contract. So new modules in the future are not tied to objects...just interfaces.

More specifically, you need to ensure you don't have a backward link to the assembly that's loading the "add-in". If you have the interface definitions in the main assembly the add-in assembly can be fully sandboxed from it and would not be able to unloaded. The third assembly, offers the ability for everything the add-in needs to be completely sandboxed from the main assembly, which can be loaded into its own separate AppDomain and actually unloaded.

PeterRitchie at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Peter Ritchie wrote:
Shawn Farkas (shawnfa) has some good articles and blog entries on add-ins and security and sandboxing in both .NET 1.x and 2.0.

Good suggestion...If you are not familiar with where MS blogs are kept; hers is here http://blogs.msdn.com/shawnfa/

OmegaMan at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...