Refactoring to a really small but useful model island
summary
A ten‑year, database‑first C# system for mass recruitment (from five to 20,000 applicants) is peeled into a small, useful model island: replace sprawling generated models with language vs selection procedure aggregates, turn “person” into a candidate value object, encapsulate enroll/close/add‑result behavior, and stop reaching everywhere into the ORM. Uses strategy/composite patterns and iterative extractions, keeps results coming from the external system, separates reads from writes, and produces clearer rules, ownership boundaries, and a safer path to evolve the production code.
AI-written summary · about
chapters (13)
- 0:00Introduction to legacy code
- 1:00Understanding the domain
- 3:48Analyzing the data model
- 5:55Code base challenges
- 8:21Refactoring strategies
- 10:41Examining enrollment logic
- 14:45Language vs selection procedures
- 17:15Modeling the new domain
- 20:58Defining candidate actions
- 25:03Creating new domain objects
- 30:16Refactoring techniques
- 34:04Handling enrollment lifecycle
- 37:22Finalizing the model
