Is there a standard for how solutions/projects are organized in regards to interfaces and the classes that implement them? I'm working on a an MVP, DDD application and would love to hear feedback as to how others layout their projects and why they do it that way. Thanks!!
They should live in the namespace that is logical for them; this means that there's no firm rule for whether or not they should reside in the same namespace. You'll find relatively abstract namespaces often don't live alongside their implementation, whereas interfaces that are more 1:1 with their implementors are more likely to remain alongside one another.
A more important consideration is to keep the interfaces consumable for reuse--normally this means more consideration given to what goes into the assembly alongside the interfaces, rather than the namespaces.
Check Martin Fowler's pattern on Separate Interfaces, it might help you decide where to put them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With