Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
MVVM vs. MVP
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Dmytro Khmelenko
October 10, 2017
Programming
61
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
58
Securing Python Web Applications
dkhmelenko
0
43
Best of login experience
dkhmelenko
0
130
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
130
Red or Green? Let us test
dkhmelenko
0
52
A journey to smaller APK size
dkhmelenko
1
130
A journey to smaller apk size
dkhmelenko
0
78
How Git helps us with localization
dkhmelenko
0
110
Dagger.Android module
dkhmelenko
0
81
Other Decks in Programming
See All in Programming
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
170
Jetpack Compose Mechanisms
skydoves
3
890
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
620
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.9k
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
200
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
480
ChromeでローカルLLM
ryu1013
0
170
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7k
Domain-Driven Transformation
hschwentner
2
2.3k
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
290
phperだってパンチカードでコーディングしたい
o0h
PRO
0
480
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
260
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
350
Prompt Engineering for Job Search
mfonobong
0
550
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
540
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
Ethics towards AI in product and experience design
skipperchong
2
440
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
590
Paper Plane
katiecoart
PRO
5
54k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Into the Great Unknown - MozCon
thekraken
41
2.8k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
RailsConf 2023
tenderlove
30
1.6k
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