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
Dmytro Khmelenko
October 10, 2017
Programming
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MVVM vs. MVP
Comparison architectures MVVM for iOS and MVP for Android
Dmytro Khmelenko
October 10, 2017
More Decks by Dmytro Khmelenko
See All by Dmytro Khmelenko
Securing High-Risk Django Applications: Lessons from the Payment Domain
dkhmelenko
0
53
Securing Python Web Applications
dkhmelenko
0
43
Best of login experience
dkhmelenko
0
120
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
130
Red or Green? Let us test
dkhmelenko
0
52
A journey to smaller APK size
dkhmelenko
1
130
A journey to smaller apk size
dkhmelenko
0
78
How Git helps us with localization
dkhmelenko
0
110
Dagger.Android module
dkhmelenko
0
79
Other Decks in Programming
See All in Programming
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
440
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
580
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
340
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
440
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
470
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
360
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
180
Heart of Swift Concurrency
koher
0
1.2k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
200
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
310
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
390
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
760
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
570
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