Why is it possible to create a separate class library for interfaces with business modules?
In wcsf, it is possible to create a business module with a separate class library for interfaces only if I check the corresponding / box.
What's the point of having a separate class library just for interfaces? Wouldn't that add unnecessary bloat to my project and create a high coupling between the two class libraries? What would be wrong with storing interfaces in a class library that stores specific classes?
Thank.
source to share
The advantage of keeping interfaces in a separate class library is that it actually decouples the libraries for implementing and using the classes. If interfaces are associated with concrete implementing classes, then you have
Implementation of Classes.dll <--- ClientClasses.dll
If you put the interfaces in a separate assembly, it looks something like this:
Implementation Classes.dll ---> Interfaces.dll <--- ClientClasses.dll
Notice how this removes the link between your client code and the implementation â this will allow your complete application to take a customization approach to find the correct implementation classes.
source to share