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
260
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
55
Creating Great APIs With Kotlin
davidtcdeveloper
0
16
Android & Docker
davidtcdeveloper
0
41
What's new in AGP 3.0
davidtcdeveloper
0
29
Pleasantly Fast Gradle Builds
davidtcdeveloper
3
170
Reactive and Functional Programming
davidtcdeveloper
0
92
Uma nova forma de construir layouts
davidtcdeveloper
1
170
Deprecated: AutoValue & Extensions for Android
davidtcdeveloper
0
63
Other Decks in Programming
See All in Programming
Apache Hive 4 on Treasure Data
ryukobayashi
1
410
What We Can Learn From OSS
inouehi
0
430
Hanami and htmx
bkuhlmann
0
220
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
140
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
9
4.2k
Netty Chicago Java User Group 2024-04-17
sullis
0
200
禅の心を手に入れよ
eltociear
1
280
Deep Dive into React Stream/Serialize
mugi_uno
3
550
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
390
Site Reliability Engineering for GMO
pyama86
8
1.1k
見た目から始める生産性向上
ikumatadokoro
10
1.3k
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
26
5.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Typedesign – Prime Four
hannesfritz
36
2.1k
Facilitating Awesome Meetings
lara
43
5.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
38
2.5k
Statistics for Hackers
jakevdp
790
220k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
Navigating Team Friction
lara
179
13k
Bash Introduction
62gerente
605
210k
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!