Refactoring your code to Java 9 modules
summary
Claims Java 9 modules enforce real boundaries so public classes can be hidden and architecture becomes visible; analysis uses Detangler and DeGraph to find cycles in a 150,000‑line codebase (40k classes, ~3,800 packages, ~285 modules) and drives refactoring. The demo splits a JavaFX vet app into model/UI/pet/glue modules, replaces direct calls with the service loader SPI to plug a pet or car module, fixes reflective access via opens, and produces a working modular app and a ~45MB runtime image with jlink.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:59From monolith to modules
- 8:03Sample application demo
- 12:16Identifying module candidates
- 15:44Refactoring packages by layers
- 17:50Java 9 module basics
- 21:17Designing new module structure
- 23:02Creating first module
- 27:42Preparing UI module
- 28:48Building pet module
- 30:56Fixing reflection issues
- 31:59Resolving cyclic dependencies
- 33:47Implementing service loader
- 37:52Finalizing pet module
- 40:22Replacing pet with car
- 43:53Running dual applications
- 47:28Compiling and packaging modules
- 48:52Creating runtime image
- 50:39Summary and benefits
- 55:34Q&A
