1. A N D R O I D
A R C H I T E C T U R E S
MVC, MVP, MVVM
2. A B O U T M E
Majid Ramezanpour
majid.ramezanpour@gmail.com
3. I F Y O U T H I N K G O O D A R C H I T E C T U R E I S
E X P E N S I V E , T R Y B A D A R C H I T E C T U R E .
BRIAN FOOTE AND JOSEPH YODER
M V C M V P M V V M
Model
View
Controller
Model
View
Presenter
Model
View
ViewModel
4. W H Y C O D E I S I N B A D
S H A P E W I T H O U T
A R C H I T E C T U R E ?
keep track of the logic
Unit Tests coverage
difficult to debug
Maintenance
Scalability
5. M V C
UI changes a lot more than logic
desktop& web wanted separating UI
functionality
8. Point of MVC was to make Model
testable
So
View & Controller
was dependent on platform
9. P R O B L E M
W I T H M V C ?
Testability? difficult to unit test
Modularity? model tightly coupled
to views
Maintenance? more&more code
transfers to controller and get
bloated
14. M V V M
ARCHITECTURE
with DataBiding
Easier Testing and Modularity
Reduce Code to Connect View + Model
16. Model
View
ViewModel
Data Layer
UI Layer
Logic Layer
handling network or database
Like Presenter in MVP but
can't access View directly.
Bind to Observable variables
and action exposed by
ViewModel