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
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
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
CSC307 Lecture 02
javiergs
PRO
1
780
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
170
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
dchart: charts from deck markup
ajstarks
3
990
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
The Limits of Empathy - UXLibs8
cassininazir
1
210
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Agile that works and the tools we love
rasmusluckow
331
21k
WCS-LA-2024
lcolladotor
0
450
Art, The Web, and Tiny UX
lynnandtonic
304
21k
How to Ace a Technical Interview
jacobian
281
24k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Docker and Python
trallard
47
3.7k
For a Future-Friendly Web
brad_frost
182
10k
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