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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Aydar
October 10, 2017
Programming
290
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
110
Development on Kotlin/Native and Swift
aydarin
1
130
AppCode under the hood
aydarin
1
350
Bridging the gap between Kotlin and Swift
aydarin
0
140
A look into AB testing
aydarin
0
93
Exploring MVVM-C
aydarin
0
180
Coordinate your app
aydarin
1
110
Localization.pdf
aydarin
0
67
image_optimization.pdf
aydarin
0
71
Other Decks in Programming
See All in Programming
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
120
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.1k
スマートグラスで並列バイブコーディング
hyshu
0
260
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.5k
Vite+ Unified Toolchain for the Web
naokihaba
0
360
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
410
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1k
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
190
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Webフレームワークの ベンチマークについて
yusukebe
0
180
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
360
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
Crafting Experiences
bethany
1
190
GraphQLとの向き合い方2022年版
quramy
50
15k
Designing for Performance
lara
611
70k
Un-Boring Meetings
codingconduct
0
320
The Cost Of JavaScript in 2023
addyosmani
55
10k
Designing for humans not robots
tammielis
254
26k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
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