# Interface-Based Design

Record: `arch:interface-based-design`
Kind: principle
Layer: [Contracts Core](https://banes-lab.com/records/layer/contracts-core.md)
Severity: recommended
Scope: class, module, service
Canonical: https://banes-lab.com/ontology#arch-interface-based-design

## Repair

- Refactored by: Extract Interface, Inject Dependency
- Detected by: concrete constructor dependencies
- Violated by: direct dependency on implementations
- Measured by: interface-to-implementation boundary ratio
- Enforced by: dependency rules

## requires

- [Abstraction](https://banes-lab.com/records/arch/abstraction.md)
- [Stable Interfaces](https://banes-lab.com/records/arch/stable-interfaces.md)

## reinforces

- [Dependency Inversion Principle (DIP)](https://banes-lab.com/records/arch/dependency-inversion.md)
- [Testability](https://banes-lab.com/records/arch/testability.md)

## enables

- [Dependency Injection](https://banes-lab.com/records/arch/dependency-injection.md)
- [Adapter Pattern](https://banes-lab.com/records/arch/adapter-pattern.md)

## conflicts-with

- [Concrete Coupling](https://banes-lab.com/records/arch/concrete-coupling.md)

## tensions-with

- [Interface Overuse](https://banes-lab.com/records/lex/interface-overuse.md)

## tensions

- [Interface-Based Design Interface Overuse](https://banes-lab.com/records/tension/interface-based-design-interface-overuse.md)

## referenced-by

- [Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md)
