Loading lesson…
Level 1 · Apprentice0 XP
God objects, anaemic models, service locators and pattern fever: how to spot and fix them.
Step 1 / 5
ProblemA small app has 40 interfaces, each with one implementation, and three layers of factories. Finding where an order is saved takes ten jumps.
← → step
Before this: Patterns in functional style
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Take a 300-line service that uses a service locator and holds all the order rules. Move the rules into the Order entity, switch to constructor injection, and show the tests got simpler.