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
0
49
MVVM vs. MVP
Comparison architectures MVVM for iOS and MVP for Android
Dmytro Khmelenko
October 10, 2017
Tweet
Share
More Decks by Dmytro Khmelenko
See All by Dmytro Khmelenko
Securing Python Web Applications
dkhmelenko
0
27
Best of login experience
dkhmelenko
0
110
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
99
Red or Green? Let us test
dkhmelenko
0
44
A journey to smaller APK size
dkhmelenko
1
120
A journey to smaller apk size
dkhmelenko
0
63
How Git helps us with localization
dkhmelenko
0
100
Dagger.Android module
dkhmelenko
0
69
Unit testing
dkhmelenko
0
43
Other Decks in Programming
See All in Programming
VS Code Update for GitHub Copilot
74th
2
660
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
300
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
220
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
Goで作る、開発・CI環境
sin392
0
240
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
650
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
12k
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
2.3k
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.4k
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
320
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
1
560
ふつうの技術スタックでアート作品を作ってみる
akira888
1
1.1k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Music & Morning Musume
bryan
46
6.7k
Designing for Performance
lara
610
69k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Balancing Empowerment & Direction
lara
1
440
A Modern Web Designer's Workflow
chriscoyier
695
190k
Building Applications with DynamoDB
mza
95
6.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
The Language of Interfaces
destraynor
158
25k
Scaling GitHub
holman
460
140k
YesSQL, Process and Tooling at Scale
rocio
173
14k
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