Scaling the Just Eat Help Centre on iOS
Article Summary
Andrea Scuderi from Just Eat reveals how his team tackled a 19,602-line legacy iOS module without a risky big-bang rewrite. Their 9-phase restructuring approach cut code by 23% while maintaining stability.
Just Eat's Help Centre module had become unmaintainable: massive view controllers, nested hierarchies, mixed storyboards and code, and a backend-driven UI with zero documentation. The team faced a critical decision: rewrite from scratch or refactor incrementally.
Key Takeaways
- Removed 23% of codebase by eliminating disabled features and unreachable code
- Achieved 85% code coverage by decoupling business logic into MVVM ViewModels
- Cut main app integration code by 56% with clear protocol boundaries
- Implemented Flow Coordinators with Chain of Responsibility for dynamic navigation
- Built record/replay mock server to keep UI tests synced with backend
Critical Insight
The team transformed a legacy backend-driven UI module through 9 iterative phases, improving testability and maintainability without risking a complete rewrite.