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
Aydar
October 10, 2017
Programming
1
260
MVVM vs MVP
Presentation for the lightning talk on spikeweek at Freeletics
Aydar
October 10, 2017
Tweet
Share
More Decks by Aydar
See All by Aydar
The Realities of A/B Testing
aydarin
0
75
Development on Kotlin/Native and Swift
aydarin
1
100
AppCode under the hood
aydarin
1
260
Bridging the gap between Kotlin and Swift
aydarin
0
120
A look into AB testing
aydarin
0
72
Exploring MVVM-C
aydarin
0
150
Coordinate your app
aydarin
1
86
Localization.pdf
aydarin
0
47
image_optimization.pdf
aydarin
0
65
Other Decks in Programming
See All in Programming
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
990
コンテキストエンジニアリング Cursor編
kinopeee
1
710
ライブ配信サービスの インフラのジレンマ -マルチクラウドに至ったワケ-
mirrativ
2
270
AIでLINEスタンプを作ってみた
eycjur
1
200
decksh - a little language for decks
ajstarks
4
21k
マイコンでもRustのtestがしたい その2/KernelVM Tokyo 18
tnishinaga
2
2.3k
フロントエンドのmonorepo化と責務分離のリアーキテクト
kajitack
2
140
管你要 trace 什麼、bpftrace 用下去就對了 — COSCUP 2025
shunghsiyu
0
470
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
660
為你自己學 Python - 冷知識篇
eddie
1
200
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
1k
GitHub Copilotの全体像と活用のヒント AI駆動開発の最初の一歩
74th
8
3.2k
Featured
See All Featured
Side Projects
sachag
455
43k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.8k
For a Future-Friendly Web
brad_frost
179
9.9k
How GitHub (no longer) Works
holman
315
140k
Producing Creativity
orderedlist
PRO
347
40k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Git: the NoSQL Database
bkeepers
PRO
431
65k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
KATA
mclloyd
32
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