Skip to main content
Tweeted twitter.com/StackProgrammer/status/686774532015800320

From Agile Software Development, Principles, Patterns, and Practices: Pearson New International Edition:

Sometimes, the methods invoked by different groups of clients will overlap. If the overlap is small, then the interfaces for the groups should remain separate. The common functions should be declared in all the overlapping interfaces. The server class will inherit the common functions from each of those interfaces, but it will implement them only once.

from : http://amzn.com/B00IZ0G6YG

Uncle Bob, talks about the case when there is minor overlap.

What should we do if there is significant overlap?

Say we have

Class UiInterface1;
Class UiInterface2;
Class UiInterface3;

Class UiIterface : public UiInterface1, public UiInterface2, public UiInterface3{};

What should we do if there is significant overlap between UiInterface1 and UiInterface2?

Sometimes, the methods invoked by different groups of clients will overlap. If the overlap is small, then the interfaces for the groups should remain separate. The common functions should be declared in all the overlapping interfaces. The server class will inherit the common functions from each of those interfaces, but it will implement them only once.

from : http://amzn.com/B00IZ0G6YG

Uncle Bob, talks about the case when there is minor overlap.

What should we do if there is significant overlap?

Say we have

Class UiInterface1;
Class UiInterface2;
Class UiInterface3;

Class UiIterface : public UiInterface1, public UiInterface2, public UiInterface3{};

What should we do if there is significant overlap between UiInterface1 and UiInterface2?

From Agile Software Development, Principles, Patterns, and Practices: Pearson New International Edition:

Sometimes, the methods invoked by different groups of clients will overlap. If the overlap is small, then the interfaces for the groups should remain separate. The common functions should be declared in all the overlapping interfaces. The server class will inherit the common functions from each of those interfaces, but it will implement them only once.

Uncle Bob, talks about the case when there is minor overlap.

What should we do if there is significant overlap?

Say we have

Class UiInterface1;
Class UiInterface2;
Class UiInterface3;

Class UiIterface : public UiInterface1, public UiInterface2, public UiInterface3{};

What should we do if there is significant overlap between UiInterface1 and UiInterface2?

edited tags; edited title
Link
gnat
  • 20.9k
  • 29
  • 115
  • 295

Interface SegragationSegregation Principle  : What to do if interfaces have significant overlap?

Source Link
q126y
  • 1.7k
  • 3
  • 15
  • 25

Interface Segragation Principle : What to do if interfaces have significant overlap?

Sometimes, the methods invoked by different groups of clients will overlap. If the overlap is small, then the interfaces for the groups should remain separate. The common functions should be declared in all the overlapping interfaces. The server class will inherit the common functions from each of those interfaces, but it will implement them only once.

from : http://amzn.com/B00IZ0G6YG

Uncle Bob, talks about the case when there is minor overlap.

What should we do if there is significant overlap?

Say we have

Class UiInterface1;
Class UiInterface2;
Class UiInterface3;

Class UiIterface : public UiInterface1, public UiInterface2, public UiInterface3{};

What should we do if there is significant overlap between UiInterface1 and UiInterface2?