Let's Stop Creating Interfaces Just in Case

Blog post cover image
In the .NET world, we have all been told at some point:
Abstract everything behind an interface.
The result: IOrderService, IEmailService, IPaymentService… and dozens of useless files. 😅

▸ The problem

Often, each interface has a single implementation. So we end up doing this 👇
public interface IOrderService { void PlaceOrder(); }
public class OrderService : IOrderService { ... }
➡️ And we believe we have “decoupled” our code. In reality, we just duplicated the complexity.

▸ Why it's an anti-pattern

▸ When an interface makes sense

▸ The takeaway

Creating an interface just in case means paying complexity debt right now… for a hypothetical scenario that may never happen.
Abstract everything, and you're left with a bunch of nothing.
Derek Comartin

▸ What about you?

Are you in the 🔥 “one interface per service” camp, or more the 🧠 “interfaces when they're useful” camp?
Let me know in the comments 👇

Does this resonate with your team?

Let's talk about how Atypical Consulting can help you move forward.

Contact me