Coupang Joris Abale May 21, 2018

Coupang Android Architecture Part 1

Article Summary

Joris Abale from Coupang reveals how they rescued a massive Android app drowning in God Activities and Fragment chaos. Their journey from architectural debt to 80% test coverage is a masterclass in pragmatic refactoring.

Coupang, one of Korea's most popular apps with 10 million users, faced a codebase crisis in 2016. Years of rapid feature development had created unmaintainable God Classes, complex fragment lifecycles, and mounting technical debt. The engineering team needed a systematic approach to modernize without disrupting their customer experience.

Key Takeaways

Critical Insight

Coupang successfully refactored their entire Android codebase to MVP architecture while maintaining service to millions of users, proving large scale modernization is possible with the right strategy.

Part 2 reveals how they took modularization even further to handle their growing team and feature complexity.

About This Article

Problem

Coupang's Android app had real issues with how fragments and activities talked to each other. The lifecycle management was messy, and fragments kept growing into God Fragments even after the team tried to break them up. This left them with a lot of technical debt spread across millions of lines of code.

Solution

Coupang looked at MVC, MVP, and MVVM to figure out what would work best. They went with MVP because it was easier to test and could be integrated without relying on beta libraries. Then they built their own MVP library to make presenter binding consistent and cut down on boilerplate code.

Impact

Adding SonarQube to their CI pipeline helped Coupang find and remove duplicate code and reduce overall app complexity. Their metrics dashboard tracked the steady decrease in code issues over time.