SOLID-Interface Segregation Principle
Details
- Full Name
-
SOLID Interface Segregation Principle (ISP)
Intent:
Clients should not be forced to depend on interfaces they do not use. Prefer many specific interfaces over one general-purpose interface.
When to Use:
-
Classes implement interface methods they don’t need (empty or throwing)
-
Changes to an interface affect clients that don’t use the changed methods
-
Fat interfaces with many methods serving different client groups
Prompt Example:
"Refactore dieses Interface nach dem SOLID-Interface Segregation Principle in kleinere, clientspezifische Interfaces."
Related Anchors:
-
SOLID Principles (Umbrella)