Architecting your codebase
summary
Live refactoring of the Spring PetClinic demo: codebase shifts from generic packages into explicit domain modules by extracting a visit context and a vet context, removing awkward shared superclasses (Person/NamedEntity), moving marshalling classes out of the domain, and renaming owner/pet aggregate to a client-facing module. Tests reveal and force config fixes: component scan and @EnableJpaRepositories locations change. Persistence gets hidden behind services so callers use service guards and developers make repositories package-private to enforce encapsulation.
AI-written summary · about
chapters (10)
- 0:00Start
- 2:45start the live coding session
- 4:11applying some refactorings
- 8:27the problem with having packages
- 13:28start to modularize
- 13:55take a look at the model and service packages
- 18:08pushing down all the fields and methods
- 22:43divide our source code into parts
- 26:11splitting it into services
- 27:41inject dependencies
related talks
31mArchitecting your codebase
23mClean Architecture? Clean Code? Refactoring? Tests? What does this change in my code?
30mHow to migrate the legacy project to Spring Boot
46mEnforcing Architecture in Legacy Systems
08h 11mDay 2
50mAnatomy of a Spring Boot App with Clean Architecture
43mInside Spring: The Architecture Behind the Framework
58mBootiful IntelliJ IDEA
