Clients should not be forced to depend on methods they do not use. Break large, 'fat' interfaces into smaller, more specific ones so that classes only need to implement the behavior that is relevant to them, reducing unnecessary coupling and preventing unrelated changes from cascading.
Examples:
- A cloud-provider library with a single broad
CloudProviderinterface includes storage, CDN, and compute methods. A provider that only supports storage must stub out the rest. Splitting intoStorageProvider,CDNProvider, andComputeProviderinterfaces lets each provider implement only what it supports.
Synonyms: isp