Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MVVM vs. MVP
Search
Dmytro Khmelenko
October 10, 2017
Programming
58
0
Share
MVVM vs. MVP
Comparison architectures MVVM for iOS and MVP for Android
Dmytro Khmelenko
October 10, 2017
More Decks by Dmytro Khmelenko
See All by Dmytro Khmelenko
Securing High-Risk Django Applications: Lessons from the Payment Domain
dkhmelenko
0
34
Securing Python Web Applications
dkhmelenko
0
40
Best of login experience
dkhmelenko
0
120
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
130
Red or Green? Let us test
dkhmelenko
0
50
A journey to smaller APK size
dkhmelenko
1
130
A journey to smaller apk size
dkhmelenko
0
75
How Git helps us with localization
dkhmelenko
0
110
Dagger.Android module
dkhmelenko
0
77
Other Decks in Programming
See All in Programming
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
110
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
7
3k
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1k
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
330
ふつうのFeature Flag実践入門
irof
7
3.4k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
700
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
110
New "Type" system on PicoRuby
pocke
1
410
Moments When Things Go Wrong
aurimas
3
140
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
190
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
360
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
The Curious Case for Waylosing
cassininazir
1
370
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
RailsConf 2023
tenderlove
30
1.5k
Fireside Chat
paigeccino
42
3.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Language of Interfaces
destraynor
162
26k
Statistics for Hackers
jakevdp
799
230k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
Transcript
MVVM-C vs MVP Aydar Mukhametzyanov Dmytro Khmelenko
None
None
View Controller Model Model-View-Controller
Layout Activity View Controller Model Model-View-Controller
View Controller Model Model-View-Controller
UIViewController Model View Controller Model-View-Controller
Problems with MVC Activity/UIViewController is a “God” class Business logic
is mixed with UI Hard to reuse Hard to implement tests
Solution Model-View-Presenter Model-View-ViewModel (+Coordinator)
View Model (Interactor) Activity Layout Presenter MVP
Solution Model-View-Presenter Model-View-ViewModel (+Coordinator)
MVVM UIViewController Model View Controller
Model ViewModel View UIViewController MVVM
Model ViewModel View UIViewController UIView MVVM Navigation?
MVVM stack Model ViewModel View Coordinator MVVM-C
MVVM stack Coordinator MVVM stack MVVM stack MVVM-C
MVVM stack MVVM stack MVVM stack MVVM stack Coordinator Coordinator
MVVM-C
View Model (Interactor) Activity Layout Presenter MVVM vs MVP Model
ViewModel View UIViewController UIView
• Provides data to Presenter/ViewModel • Processes data (networking, persistence)
Model (Interactor) Responsibilities
Responsibilities • Draws UI with provided data • Notifies Presenter/ViewModel
about user actions View
• Handles user actions from View • Gets data from
Model • Updates data in Model • Business logic • Provides updated/processed data to View Presenter/ViewModel Responsibilities ——————————————————— • Communicates with Coordinator
• Handle navigation • Build the MVVM stacks Coordinator Responsibilities
Same thing, different names?
Bindings View ViewModel Owns Observes by Reactive approach
Simulate bindings View ViewModel Owns Notifies To be continued… …with
Reactive approach?
Business logic is decoupled from UI Easy to maintain Easy
to test Easy to reuse components MVP/MVVM-C advantages
Thank you! Questions