All modules

Module 6 · Build

Application Architecture

Stop putting everything in controllers: split responsibilities across controller, service, repository, and DTO layers and organize packages so structure follows intent.

Foundation2 chapters45 minutesPrerequisite: Spring MVC and validation
Start module

Chapter plan

What you will complete

Module outcome

Refactor an endpoint-heavy prototype into a layered service where each class has one reason to change.

Mental model

Each layer answers one kind of question: HTTP translation, business decisions, persistence—never all three in one class.

Module checkpoint

Layered Task API

Refactor the REST module tasks API from controller-only code into full layers.

  • Thin controllers with no repository imports
  • Business rules tested without Spring
  • One package strategy applied consistently

Final module assessment

Ready to prove mastery?

Complete all 50 questions after finishing the module lessons and checkpoint.

Take module quiz