Encapsulation
Kind: principle
Layer: Structural Core
Record: architecture:encapsulation
Severity: mandatory
Scope: class, module, component
Canonical: Ontology
A design rule that an object's state is changed only through its own operations, which keep its invariants.
Listed in Architecture principles, after Low Coupling and before Information Hiding.
Requires
Reinforces
Enables
Conflicts with
In tension with
Tensions
Violated by
Refactored by
Severity
Category
Reinforced by
- Explicit Boundaries
- Aggregate
- Value Object
- Entity
- High Cohesion
- Iterator Pattern
- Factory Pattern
- Facade Pattern
- Proxy Pattern
Required by
Linked from
- The direction axis
- The structural domain
- Separate, trade, or mitigate
- Anti-patterns
- Domain Architecture
- Contracts / Interfaces / Compatibility
- Core Modular Design
- Metaprogramming / Language-Oriented Architecture
- Behavioral Patterns
- Creational Patterns
- Structural Patterns
- Transactions / State / Concurrency
- Core Modular Design
- Quality Attributes
- Severity levels
- The resolutions