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.
→
Aydar
October 10, 2017
Programming
1
270
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
85
Development on Kotlin/Native and Swift
aydarin
1
130
AppCode under the hood
aydarin
1
330
Bridging the gap between Kotlin and Swift
aydarin
0
130
A look into AB testing
aydarin
0
86
Exploring MVVM-C
aydarin
0
170
Coordinate your app
aydarin
1
98
Localization.pdf
aydarin
0
61
image_optimization.pdf
aydarin
0
69
Other Decks in Programming
See All in Programming
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Architectural Extensions
denyspoltorak
0
280
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
950
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
CSC307 Lecture 04
javiergs
PRO
0
660
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
AI時代の認知負荷との向き合い方
optfit
0
160
今から始めるClaude Code超入門
448jp
8
8.6k
CSC307 Lecture 06
javiergs
PRO
0
680
AI巻き込み型コードレビューのススメ
nealle
1
160
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
BBQ
matthewcrist
89
10k
Visualization
eitanlees
150
17k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Into the Great Unknown - MozCon
thekraken
40
2.3k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Are puppies a ranking factor?
jonoalderson
1
2.7k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
180
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
How to make the Groovebox
asonas
2
1.9k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
340
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