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
270
Bridging the gap between Kotlin and Swift
aydarin
0
120
A look into AB testing
aydarin
0
72
Exploring MVVM-C
aydarin
0
160
Coordinate your app
aydarin
1
88
Localization.pdf
aydarin
0
48
image_optimization.pdf
aydarin
0
65
Other Decks in Programming
See All in Programming
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
140
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
670
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.2k
複雑なドメインに挑む.pdf
yukisakai1225
5
1.1k
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
320
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.2k
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
10
3.8k
🔨 小さなビルドシステムを作る
momeemt
4
670
TDD 実践ミニトーク
contour_gara
1
290
速いWebフレームワークを作る
yusukebe
5
1.7k
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.5k
We Have a Design System, Now What?
morganepeng
53
7.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
920
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Practical Orchestrator
shlominoach
190
11k
Statistics for Hackers
jakevdp
799
220k
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