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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Dmytro Khmelenko
October 10, 2017
Programming
60
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MVVM vs. MVP
Comparison architectures MVVM for iOS and MVP for Android
Dmytro Khmelenko
October 10, 2017
More Decks by Dmytro Khmelenko
See All by Dmytro Khmelenko
Securing High-Risk Django Applications: Lessons from the Payment Domain
dkhmelenko
0
45
Securing Python Web Applications
dkhmelenko
0
41
Best of login experience
dkhmelenko
0
120
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
130
Red or Green? Let us test
dkhmelenko
0
51
A journey to smaller APK size
dkhmelenko
1
130
A journey to smaller apk size
dkhmelenko
0
76
How Git helps us with localization
dkhmelenko
0
110
Dagger.Android module
dkhmelenko
0
78
Other Decks in Programming
See All in Programming
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
600
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
530
FDEが実現するAI駆動経営の現在地
gonta
2
290
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
250
メールのエイリアス機能を履き違えない
isshinfunada
0
240
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
仕様駆動開発の消費期限
watany
20
8.7k
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.7k
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
720
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.4k
テーブルをDELETEした
yuzneri
0
150
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.7k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
How to make the Groovebox
asonas
2
2.3k
Music & Morning Musume
bryan
47
7.3k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
450
The Language of Interfaces
destraynor
162
27k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
410
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
4 Signs Your Business is Dying
shpigford
187
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