Scale Forem

Scale YouTube
Scale YouTube

Posted on

CodeOpinion: You Don’t Need an Interface for Everything

You don’t really need an IWhateverService for every class—if there’s only one implementation, you’re just drowning in pointless boilerplate. Most interfaces add zero value unless you actually need to swap implementations or mock things out.

Interfaces shine when you’ve got multiple implementations or clear boundary contracts, not just because your DI framework said so. Sometimes a simple delegate, inheritance/override, or even good old comments can be all the abstraction you really need.

Watch on YouTube

Top comments (0)