Why just "interface segregation principle" but not "method segregation...
According to one definition of "interface segregation principle" that states currently in Two contradicting definitions of Interface Segregation Principle – which one is correct?, a client should not...
View ArticleAnswer by sfiss for Why just "interface segregation principle" but not...
You do not need it for the concrete case because there is already a different principle for that: program to interfacesalso, following the DIP will often lead you to using the interface (abstraction)...
View ArticleAnswer by JacquesB for Why just "interface segregation principle" but not...
The principle of Low Coupling/High Cohesion states that functionality that is closely related and interdependent should be in the same class or module, and functionality that is not closely related...
View ArticleAnswer by Ewan for Why just "interface segregation principle" but not "method...
Because it leads to a million interfaces.ICanDeleteICanAddICanAddAndDeleteetc
View ArticleAnswer by Caleth for Why just "interface segregation principle" but not...
There isn't a difference between "clients don't call all methods of a interface" and "clients don't call all methods of a concrete class". We can't really tell from a tiny example with one call site...
View ArticleAnswer by Christophe for Why just "interface segregation principle" but not...
The interface segregation aims to avoid that classes implementing interfaces should not have to have to implement something that is not strictly needed.The single responsibility is another principle,...
View ArticleAnswer by Flater for Why just "interface segregation principle" but not...
Let's take the following advice:Surgeons should scrub before they perform surgery.Well, let's say Bob hears this advice and counters it, asking us if that means that untrained people shouldn't scrub...
View ArticleAnswer by Filip Milovanović for Why just "interface segregation principle"...
These principles are largely language agnostic, so, the word "interface" doesn't mean a Java interface type (although, that's often what it will end up being in Java). The term is used in its more...
View ArticleAnswer by candied_orange for Why just "interface segregation principle" but...
"clients don't call all methods of a interface" a problem, but "clients don't call all methods of a concrete class" isn't?Says who?Why just "interface segregation principle" but not "method segregation...
View ArticleAnswer by Mustafa Gundogan for Why just "interface segregation principle" but...
Actuallywhy is "clients don't call all methods of a interface" a problem, but "clients don't call all methods of a concrete class" isn't?is not the problem here. There is no problem in...
View Article