Program to interface, not to implementation” doesn't mean you should pair each and every one of your domain classes with a more or less identical interface. In doing so, you are violating YAGNI, and lowering the readability and maintainability of your codebase.

Having one and only one class implementing an interface most of the time is an overuse of interfaces and it does more harm than good.

I’m only saying that interfaces that mirror one and only one class implementation are a waste. Here are some cases where interfaces may be useful: It is very likely that you are not using interfaces correctly if you are not structuring your project by domain.

Related Articles