© Matthias Noback 2018
Matthias NobackPrinciples of Package Designhttps://doi.org/10.1007/978-1-4842-4119-6_4

4. The Interface Segregation Principle

Matthias Noback1 
(1)
Zeist, The Netherlands
 
The fourth SOLID principle is the Interface Segregation principle. It gives us the following instruction1:

Make fine-grained interfaces that are client specific.

“Fine-grained interfaces” stands for interfaces with a small amount of methods. “Client specific” means that interfaces should define methods that make sense from the point of view of the client that uses the interface.

In order to reach an understanding of this principle, we will, just like in the previous chapter, discuss some common violations of it. Each violation is followed by a change in the ...

Get Principles of Package Design: Creating Reusable Software Components now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.