Back to articles

You Don’t Need an Interface for Everything

via CodeOpinionCodeOpinion

You’ve probably seen it: IOrderService, IEmailService, IPaymentService… and every class has exactly one implementation. But do you really need all those interfaces? Here's why most interfaces add no real value, when they actually do make sense, and how this habit started because of how Dependency Injection is taught in .NET. 🔗 Kurrent (formely EventStoreDB) https://kurrent.io 🔔 Subscribe: https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw?sub_confirmation=1 💥 Join this channel to get access to a private Discord Server and any source code in my videos. 🔥 Join via Patreon https://www.patreon.com/codeopinion ✔️ Join via YouTube https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw/join 📝 Blog: https://codeopinion.com 👋 Twitter: https://twitter.com/codeopinion ✨ LinkedIn: https://www.linkedin.com/in/dcomartin/ 📧 Weekly Updates: https://mailchi.mp/63c7a0b3ff38/codeopinion 0:00 Intro 3:25 Delegate 4:33 Override 6:30 Comments

Watch on CodeOpinion

Opens in a new tab

Watch on YouTube
2 views

Related Articles