Jason Meridth

I am a continuously learning senior full stack SDE/SRE trying to not let best be the enemy of better.

Buy me a coffeeBuy me a coffee

Interface Segregation Principle (ISP)

30 Dec 2006 » »

The Interface Segregation Principle (ISP) - CLIENTS SHOULD NOT BE FORCED TO DEPEND UPON INTERFACES THAT THEY DO NOT USE

*This is the definition straight out of the Object Mentor article book.

Translation:  Avoid “fat” interfaces or interface pollution.  In other words, do not make your classes implement interfaces that have methods/properties the class does not need.  This is a code smell and should be an indicator that the interface should be split into two interfaces and each applied only as needed.

The example in the article (pgs 2-7) explains it all.