Layered Architecture

Layered architecture separates responsibilities into horizontal layers such as presentation, application, domain, and infrastructure.

Core Idea

The system is organized into stacked layers where each layer has a specific responsibility. Each layer depends only on the layer directly below it. This creates a clear separation of concerns and makes it straightforward to understand where each type of logic belongs.

Presentation Layer
Application Layer
Domain Layer
Infrastructure Layer

Each layer depends only on the layer below it

When to Use

When to Avoid

Benefits

Trade-offs

Common Failure Modes

Related Styles