Layered (N-Tier)
ApplicationHorizontal organization in layers: presentation, logic, data
Principles
Layers separated by responsibilityDependencies only downwardEach layer abstracts the one belowChange isolation per layer
When to use
Traditional enterprise applications, teams with limited experience, projects with stable requirements
When not to use
Very simple applications, microservices, when performance is critical
Pros and Cons
Ventajas
- + Easy to understand and organize
- + Clear separation of concerns
- + Parallel development by teams
- + Well supported by frameworks
Desventajas
- - Can lead to redundant code
- - Layers can become too coupled
- - Performance overhead from traversing layers