# SOLID / Object-Oriented Design

> Every term in this category is listed as one record, with its kind, its definition and its aliases, the principles whose relations name it, the principle or…

Page: Ontology · Lexicon
Canonical: https://banes-lab.com/ontology/lexicon#lexicon-category-solid-object-oriented-design

Listed in [Ontology · Lexicon](https://banes-lab.com/api/pages/ontology/lexicon.md), after [Self-Healing / Recovery / Deployment Safety](https://banes-lab.com/ontology/lexicon/lexicon-category-self-healing-recovery-deployment-safety.md) and before [Streaming / Pipeline / Dataflow Processing](https://banes-lab.com/ontology/lexicon/lexicon-category-streaming-pipeline-dataflow-processing.md).

Every term in this category is listed as one record, with its kind, its definition and its aliases, the principles whose relations name it, the principle or contract that carries the same name where one exists, and the layer its category belongs to. A tag category also gives each term an example, which is the file the tag places or the rename from a refused word onto a covering tag.

### Broken Inheritance

- Kind: [anti-pattern](https://banes-lab.com/records/kind/anti-pattern.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
A subclass that violates its base type's contract, for example by an override that changes the expected inputs or outputs, so substituting it breaks callers that rely on the base behavior.

Aliases
Incompatible Override

Referenced by
[Liskov Substitution Principle (LSP)](https://banes-lab.com/records/architecture/liskov-substitution.md)

How it is checked

Checked by
[Liskov Substitution Principle (LSP)](https://banes-lab.com/records/architecture/liskov-substitution.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Concrete Dependency

- Kind: [anti-pattern](https://banes-lab.com/records/kind/anti-pattern.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
Depending directly on a concrete implementation instead of an abstraction, coupling high-level code to low-level detail.

Referenced by
[Dependency Inversion Principle (DIP)](https://banes-lab.com/records/architecture/dependency-inversion.md)

How it is checked

Checked by
[Dependency Inversion Principle (DIP)](https://banes-lab.com/records/architecture/dependency-inversion.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Consumer-Specific Contracts

- Kind: [capability](https://banes-lab.com/records/kind/capability.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
The ability to give each client an interface exposing only the operations it uses.

Referenced by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

How it is checked

Checked by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Contract Preservation

- Kind: [constraint](https://banes-lab.com/records/kind/constraint.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
The requirement that a subtype honor every behavioral guarantee of the type it replaces.

Referenced by
[Liskov Substitution Principle (LSP)](https://banes-lab.com/records/architecture/liskov-substitution.md)

Distinct from
[Invariant](https://banes-lab.com/records/architecture/invariant.md): Contract preservation binds a subtype to all of its base type's guarantees, while an invariant is one guarantee that holds in every state.

Distinct from
[Postconditions](https://banes-lab.com/records/architecture/postconditions.md): Contract preservation binds a subtype to every guarantee, while a postcondition is the one an operation gives on return.

Distinct from
[Preconditions](https://banes-lab.com/records/architecture/preconditions.md): Contract preservation binds a subtype to every guarantee, while a precondition is what an operation needs before it runs.

How it is checked

Checked by
[Liskov Substitution Principle (LSP)](https://banes-lab.com/records/architecture/liskov-substitution.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Fat Interface

- Kind: [anti-pattern](https://banes-lab.com/records/kind/anti-pattern.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
An interface bundling many unrelated operations, forcing clients to depend on methods they never call.

Referenced by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

Distinct from
[Repository Dump](https://banes-lab.com/records/architecture/repository-dump.md): A fat interface bundles unrelated operations for its clients, while a repository dump is a repository grown into a second service layer.

How it is checked

Checked by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Feature Extension without Modification

- Kind: [capability](https://banes-lab.com/records/kind/capability.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
The ability to add new behavior by writing new code rather than editing existing, tested code.

Referenced by
[Open/Closed Principle (OCP)](https://banes-lab.com/records/architecture/open-closed.md)

How it is checked

Checked by
[Open/Closed Principle (OCP)](https://banes-lab.com/records/architecture/open-closed.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Interface Proliferation

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
The degree to which splitting interfaces finely multiplies the number of small interfaces to manage.

Referenced by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

How it is checked

Checked by
the tension resolution with interface-segregation

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Narrow Specialized Behavior

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
The degree to which honoring a base type's contract constrains a subtype from specializing its own behavior.

Referenced by
[Liskov Substitution Principle (LSP)](https://banes-lab.com/records/architecture/liskov-substitution.md)

How it is checked

Checked by
the tension resolution with liskov-substitution

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Role-Specific Interfaces

- Kind: [constraint](https://banes-lab.com/records/kind/constraint.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
The requirement that interfaces be defined per client role rather than as one general-purpose surface.

Referenced by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

How it is checked

Checked by
[Interface Segregation Principle (ISP)](https://banes-lab.com/records/architecture/interface-segregation.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Switch-Based Extension

- Kind: [anti-pattern](https://banes-lab.com/records/kind/anti-pattern.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
Extending behavior by editing a growing switch or conditional on a type instead of adding a new polymorphic type.

Referenced by
[Open/Closed Principle (OCP)](https://banes-lab.com/records/architecture/open-closed.md)

How it is checked

Checked by
[Open/Closed Principle (OCP)](https://banes-lab.com/records/architecture/open-closed.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

### Type Switching

- Kind: [anti-pattern](https://banes-lab.com/records/kind/anti-pattern.md)
- Category: [SOLID / Object-Oriented Design](https://banes-lab.com/ontology/lexicon/lexicon-category-solid-object-oriented-design.md)
- Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)

Details

Definition
Branching on an object's concrete type instead of dispatching through a shared polymorphic interface.

Referenced by
[Polymorphism](https://banes-lab.com/records/architecture/polymorphism.md)

How it is checked

Checked by
[Polymorphism](https://banes-lab.com/records/architecture/polymorphism.md)

Population
The term's definition and every architecture edge that names the term

Freshness
A verdict stands until the definition, the term's kind or an edge that names it changes

Refusal
The resolution gate fails an edge that resolves to no term, and a definition that opens as another kind

Observation
The resolution validator's pass over every edge target and every definition opening

Evidence
Watched to fire and to accept: a suite plants a term no edge names, a dangling dependency and a second check home, and the bundled terms pass

Authoritative side
The term record, which every edge that names the term cites

Depends on
Not answered

Shape it refuses
Not answered

## Links to

- [anti-pattern](https://banes-lab.com/records/kind/anti-pattern.md)
- [Structural Core](https://banes-lab.com/records/layer/structural-core.md)
- [Liskov Substitution Principle](https://banes-lab.com/records/architecture/liskov-substitution.md)
- [Dependency Inversion Principle](https://banes-lab.com/records/architecture/dependency-inversion.md)
- [capability](https://banes-lab.com/records/kind/capability.md)
- [Interface Segregation Principle](https://banes-lab.com/records/architecture/interface-segregation.md)
- [constraint](https://banes-lab.com/records/kind/constraint.md)
- [Invariant](https://banes-lab.com/records/architecture/invariant.md)
- [Postconditions](https://banes-lab.com/records/architecture/postconditions.md)
- [Preconditions](https://banes-lab.com/records/architecture/preconditions.md)
- [Repository Dump](https://banes-lab.com/records/architecture/repository-dump.md)
- [Open/Closed Principle](https://banes-lab.com/records/architecture/open-closed.md)
- [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- [Polymorphism](https://banes-lab.com/records/architecture/polymorphism.md)
