Where to place interfaces in a typical multi-layered app with DataAccess, BusinessLogic and an Endpoint modules? I propose 2 options
In both cases there's only dependency from abstractions, but in first one we place interfaces in the same module with implementation, in second - we move all interfaces in the separate module.
I have these pros and cons:
- more stupid-simple (why shall we need this extra module? it's too complicated etc)
- more TDD-friendly as it allows us completely to separate from the module that implements contract when we mock it.
- more DI friendly - we can succeed in complete isolation of modules.
Yet the second option leads to greater overhead and requires more effort while developing.
So, my question is - what approach is generally better (or are there any other, more appropriate options)?