Design by Contract

Kind: principle

Layer: Contracts Core

Aliases: DbC

Record: architecture:design-by-contract

Severity: recommended

Scope: API, function, class, service

Canonical: Ontology

A design rule that every operation states the preconditions it needs, the postconditions it guarantees and the invariants it keeps.

Listed in Architecture principles, after PACELC Theorem and before Explicit Contracts.

Requires

Reinforces

Enables

Conflicts with

In tension with

Tensions

Contracts

Violated by

Refactored by

Severity

Category

Linked from