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
300
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MVVM vs MVP
Presentation for the lightning talk on spikeweek at Freeletics
Aydar
October 10, 2017
More Decks by Aydar
See All by Aydar
The Realities of A/B Testing
aydarin
0
120
Development on Kotlin/Native and Swift
aydarin
1
130
AppCode under the hood
aydarin
1
360
Bridging the gap between Kotlin and Swift
aydarin
0
150
A look into AB testing
aydarin
0
99
Exploring MVVM-C
aydarin
0
190
Coordinate your app
aydarin
1
110
Localization.pdf
aydarin
0
68
image_optimization.pdf
aydarin
0
72
Other Decks in Programming
See All in Programming
Google Apps Script で Ruby を動かす
kawahara
0
220
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
900
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
120
今さら聞けない .NET CLI
htkym
0
190
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
580
仕様駆動開発の消費期限
watany
20
8.3k
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.8k
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
370
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
690
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
260
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
500
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
Featured
See All Featured
The Curse of the Amulet
leimatthew05
2
14k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
390
Test your architecture with Archunit
thirion
1
2.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
490
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
Speed Design
sergeychernyshev
33
2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
Utilizing Notion as your number one productivity tool
mfonobong
4
540
A Soul's Torment
seathinner
6
3.4k
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