Best Practices: Should I create own assemblies for module interfaces?

Coordinator
Dec 23, 2008 at 10:37 AM

The Smart Client Software Factory (SCSF) introduced the concept of interface assemblies. An interface assembly contains only the interfaces so that the client and the service module can collaborate together.

[Client Module]   ---- uses ---->   [Interface Assembly]   <---- implements ----   [Service Module]


I believe this is a good thing:

  1. A software architect might be able to create the interface assemblies first and then give these assemblies to the software development teams which implement the client and the service modules at the same time.
  2. I’m able to test the client module through the interface assembly without the need of the service module. The same is true for the opposite direction where I test the service module through the interface assembly.
  3. Through the usage of an explicit interface assembly it is more visible to software developers which interfaces are used in other modules. If someone needs to modify the interface assembly to fix a bug or implement a new product feature then he is aware that changes in the interface assembly might produce side-effects.

I have used interface assemblies in my Test Suite reference implementation. An overview of the modules and interface assemblies can be seen here. I think it’s a good idea to keep the dependencies and so the references of interface assemblies as low as possible. A few of my interface assemblies needs a reference to the Composite WPF libraries because they are using the CompositeCommand or the CompositeWPFEvent classes. Both classes are specific to the WPF UI Framework. And this is something I don’t like to have because I might be able to reuse some of my modules in an ASP .NET project. But if my interfaces are already tied to a UI Framework then I’m not able to reuse the modules in other projects that are using a different UI Framework.

My questions:

  1. What do you think about creating own assemblies just for the module interfaces?
  2. Is it worth to implement the concepts of the Command and Event Aggregator in a UI Framework independent way? Maybe MEF (Managed Extensibility Framework) does target this idea?