Software Architecture: Layered Model / Layers
This article is a definition of terms for the layered model – including exam questions and tags.
In a Nutshell
Layered Architecture organizes systems into separate layers with clear responsibilities – for clean separation, maintainability, and scalability.
Compact Technical Description
The layered model divides an application into vertically stacked, logically separated layers. Each layer has a responsibility and communicates only with the layer directly beneath it.
Typical:
- Presentation (UI)
- Business Logic (Controller/Services)
- Data Access (DAO/Repository)
- Infrastructure (Logging, Security, Caching)
Exam-Relevant Key Points
- Clear responsibilities per layer
- Communication only with adjacent layer
- Promotes maintainability/testability
- Frequently used in IHK projects
- Security: Validation/Access control in middle layers
- Documentation: Layer diagram + layer description
Core Components
- UI
- Business
- Data Access
- Infrastructure
- DTOs
- Validation
- Error Handling
- Service Layer
- Auth/AuthZ
- Build/Deploy Structure
Practical Example
Booking System:
UI (React) → Business (Java) → Data Access (JPA)
Advantages and Disadvantages
Advantages
- Good testability
- Team collaboration (Frontend/Backend/DB)
- Interchangeability
Disadvantages
- Overhead for small projects
- Performance loss with too many layers
Typical Exam Questions (with Short Answer)
- Goal of the layered model? Separation of concerns.
- What must a layer not do? Communicate directly with non-adjacent layers.
- Where does validation belong? In the business layer.
Further Information
- https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/layered
- https://arc42.org/