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, MVP e outras letrinhas
Search
David Tiago Conceição
July 18, 2017
Programming
0
270
MVVM, MVP e outras letrinhas
David Tiago Conceição
July 18, 2017
Tweet
Share
More Decks by David Tiago Conceição
See All by David Tiago Conceição
Trunk Based Development
davidtcdeveloper
0
68
Creating Great APIs With Kotlin
davidtcdeveloper
0
25
Android & Docker
davidtcdeveloper
0
53
What's new in AGP 3.0
davidtcdeveloper
0
63
Pleasantly Fast Gradle Builds
davidtcdeveloper
3
180
Reactive and Functional Programming
davidtcdeveloper
0
100
Uma nova forma de construir layouts
davidtcdeveloper
1
170
Deprecated: AutoValue & Extensions for Android
davidtcdeveloper
0
68
Other Decks in Programming
See All in Programming
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
500
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
100
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
680
Catch Up: Go Style Guide Update
andpad
0
150
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
2.9k
Your Perfect Project Setup for Angular @BASTA! 2025 in Mainz
manfredsteyer
PRO
0
120
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
4.2k
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
300
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
170
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
160
私はどうやって技術力を上げたのか
yusukebe
43
17k
Pythonスレッドとは結局何なのか? CPython実装から見るNoGIL時代の変化
curekoshimizu
4
1.3k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
173
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Docker and Python
trallard
46
3.6k
Typedesign – Prime Four
hannesfritz
42
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
How STYLIGHT went responsive
nonsquared
100
5.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
For a Future-Friendly Web
brad_frost
180
9.9k
Transcript
MVVM, MVP e outras letrinhas
None
MVP e MVVM • Não são arquiteturas
None
MVP e MVVM • Camada de apresentação
Model • Camada em comum • “Regras de negócio” •
Use cases • Interactors
View • Interação com usuário • Interação com componentes externos
• Diferentes implementações ◦ Activities ◦ Fragments ◦ Views ◦ …
MVP • View passiva • Contratos entre Presenter e View
• Abstração da View no Presenter
MVP
MVP
MVP • No código
MVP • Pontos fortes ◦ Simplicidade ◦ Fácil entendimento ◦
Contratos ◦ Frameworks adicionais opcionais
MVP • Pontos de atenção ◦ Heavy Presenters ◦ Heavy
Views ◦ Heavy Contracts ◦ Light Contracts ◦ Android Architecture Components
MVVM • View reativa • Campos observáveis entre ViewModel e
View • ViewModel desconhece a View
MVVM
MVVM
MVVM • No código
MVVM • Pontos fortes ◦ Componentes reativos ◦ Altamente flexível
◦ Nenhum contrato ◦ Data binding ◦ Android Architecture Components
MVVM • Pontos de atenção ◦ Heavy ViewModels ◦ Frameworks
adicionais quase obrigatórios ◦ Data binding ▪ ObservableFields públicos ▪ Custom binding adapters ◦ Maior complexidade ◦ Memória
Pontos polêmicos • Android no Presenter/ViewModel ◦ Context ◦ View
◦ Testes • Life cycle • Salvando estado ◦ Presenter/ViewModel ◦ Model
Pontos polêmicos • Contratos • Navegação • Overengineering • Padrão
único
Para saber mais? • Android Architecture Blueprints • Android Testing
Codelab • Android Architecture Components • Zen Android MVVM • Presenters are not for persisting • Your presenters don’t need all those lifecycle events
slack.AndroidDevBR.org Android Dev BR
Obrigado!