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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
37
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
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.5k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
180
Oxcを導入して開発体験が向上した話
yug1224
4
330
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.3k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
730
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
320
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
600
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
600
OSもどきOS
arkw
0
580
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
210
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Prompt Engineering for Job Search
mfonobong
0
350
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
610
Writing Fast Ruby
sferik
630
63k
Typedesign – Prime Four
hannesfritz
42
3.1k
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