Layered architecture and its limits
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
recognize what layering gives and where it breaks.
Planned topics
- Layers: web → service → persistence; each layer calls the one below.
- Strength: simple, familiar, fast to start.
- Weakness: the database sits at the bottom, so the domain ends up shaped by tables and the ORM.
- Services become "transaction scripts" over anemic entities; business rules scatter.
- Tests need a database because the logic cannot be reached without it.
Draft outline details
Demonstration
a three-box stack with the arrow pointing down to JpaRepository, and a note "domain depends on infrastructure".
Check your understanding
Which way do dependencies point in a classic layered app?
Show answer
Downward, ending at the database.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.