concept ISP in category dependency injection

appears as: ISP, The ISP, ISP
Dependency Injection

This is an excerpt from Manning's book Dependency Injection.

The ISP may at first seem to be distantly related to DI. It’s important because an interface that models too much pulls you in the direction of a particular implementation. It’s often a smell of a Leaky Abstraction and makes it harder to replace Dependencies. This is because some of the interface members may make no sense in a context that’s different to the one that drove the initial design.13  In chapter 10, however, you’ll learn that the ISP is crucial when it comes to effectively applying DI and Aspect-Oriented Programming.

In section 6.2.1, you learned that the ISP promotes the use of fine-grained Abstractions, rather than wide Abstractions. Any time a consumer depends on an Abstraction where some of its members are unused, the ISP is violated.

The ISP can, at first, seem to be distantly related to DI, but that’s probably because we ignored this principle for most of this book. That’ll change in section 10.3, where you’ll learn that the ISP is crucial when it comes to effectively applying Aspect-Oriented Programming.