Quantcast
Channel: Why just "interface segregation principle" but not "method segregation principle"? - Software Engineering Stack Exchange
Browsing index pages (10 articles)

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 Article


Answer 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 Article


Answer 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 Article

Answer by Ewan for Why just "interface segregation principle" but not "method...

Because it leads to a million interfaces.ICanDeleteICanAddICanAddAndDeleteetc

View Article

Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article


Answer 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
Browsing index pages (10 articles)


Latest Images