Which Architecture patterns are used on Android?
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
Android has used several architecture patterns over time, but the most common ones developers discuss are MVC, MVP, MVVM, MVI-style unidirectional state flow, and layered approaches often described as Clean Architecture. The right choice depends less on fashion and more on how you want state, UI logic, and business rules to be separated.
In modern Android development, MVVM plus a repository/data layer is the most common baseline, especially when paired with Jetpack components and declarative UI patterns.
Historical Patterns: MVC and MVP
Early Android apps often drifted into an MVC-like shape where:
- models held data
- XML plus widgets formed the view
- '
ActivityorFragmentacted as controller'
In practice, this often produced “massive activities” because Android framework classes accumulated UI logic, navigation, lifecycle code, and business coordination.
MVP tried to fix that by moving presentation logic into a presenter.
This improved testability, but presenter-heavy code could still become large.
MVVM Became the Common Default
MVVM fits Android well because a ViewModel survives configuration changes more gracefully than putting all state in an Activity, and it works naturally with observable state.
The view observes state, and the ViewModel exposes commands and derived data. This works with both XML-based UIs and modern Compose-based screens.
MVI and Unidirectional Data Flow
Some Android teams prefer MVI-style designs or similar unidirectional state models. The exact naming varies, but the core idea is stable:
- the UI emits events
- a state holder processes them
- the UI renders a single state object
This style is especially attractive in Compose because rendering UI from immutable state maps cleanly onto declarative UI updates.
Clean Architecture as a Layering Strategy
Clean Architecture is often used alongside MVVM rather than instead of it. In Android discussions, it usually means separating the app into layers such as:
- UI layer
- domain or use-case layer
- data layer
So a real project might be described as “MVVM with repositories and use cases,” not as one isolated named pattern.
What Teams Actually Use
In real Android codebases, patterns are often blended:
- MVVM for presentation
- repositories for data access
- use cases for business rules
- unidirectional state flow for UI events and state
That blend is more realistic than expecting every app to match one textbook diagram.
Common Pitfalls
- Treating architecture names as rigid templates instead of tradeoff-driven design tools.
- Leaving too much logic in
ActivityorFragmentclasses and calling it MVC by accident. - Building so many layers that simple screens become harder to understand, test, and change.
- Confusing MVVM with “put every piece of code into a ViewModel,” which creates another kind of giant class.
- Debating pattern names while ignoring the real goals of state ownership, testability, and separation of concerns.
Summary
- Android has used MVC, MVP, MVVM, MVI-style state flow, and Clean Architecture-inspired layering.
- In modern Android apps, MVVM with repositories is the most common baseline.
- MVI-style state management is especially popular in declarative UI flows.
- Clean Architecture usually describes layering around a presentation pattern rather than replacing it.
- Good Android architecture is about clear state and responsibility boundaries, not about picking the trendiest acronym.
Related reading
- Which iOS app version/build numbers MUST be incremented upon App Store release?
- Why am I getting an error Failed to locate or generate matching signing assets in Xcode 6?
- Why am I getting ibtool failed with exit code 255?
- Why Android Studio says Waiting For Debugger if am NOT debugging?
- Why are build types distinct from product flavors?
- Why are emoji characters like \U0001F469\U0001F469\U0001F467\U0001F466 treated so strangely in Swift strings?
- Why are kotlin coroutines called asynchronous?
- Why can't I call the default super.init on UIViewController in Swift?
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.