Description
Onion Architecture is an architectural style that places the domain model (business logic) at the center, surrounded by layers (or “rings”) of application services, and infrastructure or external integrations on the outermost edge. The idea is that all dependencies point inwards toward the core domain, ensuring the business logic remains independent of external frameworks or technologies.
Key Elements
- Domain Layer (Core): Contains Entities, Value Objects, and domain services. No outward dependencies.
- Application Layer: Defines use cases and orchestrates domain operations, but still does not depend on external infrastructure.
- Infrastructure Layer: Implements external concerns (e.g., database access, messaging, user interfaces) and depends on the inner layers.
- Dependency Flow: Outermost layers can depend on inner layers, but inner layers must not depend on outer layers.
References
- Onion Architecture by Jeffrey Palermo (Blog Post)
- Java Design Patterns – Contribution Guidelines
- Related Reading: Clean Architecture by Robert C. Martin
Acceptance Criteria
Description
Onion Architecture is an architectural style that places the domain model (business logic) at the center, surrounded by layers (or “rings”) of application services, and infrastructure or external integrations on the outermost edge. The idea is that all dependencies point inwards toward the core domain, ensuring the business logic remains independent of external frameworks or technologies.
Key Elements
References
Acceptance Criteria
onion-architecture(or similar)..mdfile) describing the pattern, explaining the layering principle, and illustrating code flow.