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
250
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
70
Development on Kotlin/Native and Swift
aydarin
1
90
AppCode under the hood
aydarin
1
230
Bridging the gap between Kotlin and Swift
aydarin
0
110
A look into AB testing
aydarin
0
72
Exploring MVVM-C
aydarin
0
140
Coordinate your app
aydarin
1
76
Localization.pdf
aydarin
0
38
image_optimization.pdf
aydarin
0
65
Other Decks in Programming
See All in Programming
カオスに立ち向かう小規模チームの装備の選択〜フルスタックTSという装備の強み _ 弱み〜/Choosing equipment for a small team facing chaos ~ Strengths and weaknesses of full-stack TS~
bitkey
1
120
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
110
KANNA Android の技術的課題と取り組み
watabee
0
160
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
180
Optimizing JRuby 10
headius
0
520
DevOpsDaysTokyo2025社内副業で他部門へ_越境_して見えた価値再定義最大1か月のリードタイムを10分に短縮したDevOps実践.pdf
susumutomita
0
110
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
2
11k
Road to RubyKaigi: Making Tinny Chiptunes with Ruby
makicamel
4
510
RuboCop: Modularity and AST Insights
koic
2
2.1k
ComposeでWebアプリを作る技術
tbsten
0
120
The Evolution of the CRuby Build System
kateinoigakukun
1
750
プロダクト横断分析に役立つ、事前集計しないサマリーテーブル設計
hanon52_
2
500
Featured
See All Featured
Producing Creativity
orderedlist
PRO
344
40k
Code Review Best Practice
trishagee
67
18k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Done Done
chrislema
184
16k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Docker and Python
trallard
44
3.4k
GraphQLとの向き合い方2022年版
quramy
46
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
Agile that works and the tools we love
rasmusluckow
329
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
A better future with KSS
kneath
239
17k
The World Runs on Bad Software
bkeepers
PRO
68
11k
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