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
73
Development on Kotlin/Native and Swift
aydarin
1
97
AppCode under the hood
aydarin
1
250
Bridging the gap between Kotlin and Swift
aydarin
0
110
A look into AB testing
aydarin
0
72
Exploring MVVM-C
aydarin
0
150
Coordinate your app
aydarin
1
82
Localization.pdf
aydarin
0
43
image_optimization.pdf
aydarin
0
65
Other Decks in Programming
See All in Programming
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
440
ソフトウェア設計とAI技術の活用
masuda220
PRO
17
3.7k
AIともっと楽するE2Eテスト
myohei
8
3k
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
470
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
620
型で語るカタ
irof
0
700
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
170
Hack Claude Code with Claude Code
choplin
7
2.6k
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
140
CDK引数設計道場100本ノック
badmintoncryer
2
480
可変変数との向き合い方 $$変数名が踊り出す$$ / php conference Variable variables
gunji
0
180
Deep Dive into ~/.claude/projects
hiragram
14
14k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Agile that works and the tools we love
rasmusluckow
329
21k
Fireside Chat
paigeccino
37
3.5k
How to Ace a Technical Interview
jacobian
278
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Designing Experiences People Love
moore
142
24k
Building Applications with DynamoDB
mza
95
6.5k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
520
Scaling GitHub
holman
460
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
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