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
Aydar
October 10, 2017
Programming
320
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
140
AppCode under the hood
aydarin
1
370
Bridging the gap between Kotlin and Swift
aydarin
0
150
A look into AB testing
aydarin
0
100
Exploring MVVM-C
aydarin
0
190
Coordinate your app
aydarin
1
120
Localization.pdf
aydarin
0
69
image_optimization.pdf
aydarin
0
78
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
すこし踏み込む CancellationToken
htkym
2
1.7k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
480
JIS keyboard support in Omarchy
lef237
0
120
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
Event is what happens
moro
2
790
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Amusing Abliteration
ianozsvald
1
350
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Google's AI Overviews - The New Search
badams
0
1.6k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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