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
60
Creating Great APIs With Kotlin
davidtcdeveloper
0
19
Android & Docker
davidtcdeveloper
0
45
What's new in AGP 3.0
davidtcdeveloper
0
46
Pleasantly Fast Gradle Builds
davidtcdeveloper
3
170
Reactive and Functional Programming
davidtcdeveloper
0
95
Uma nova forma de construir layouts
davidtcdeveloper
1
170
Deprecated: AutoValue & Extensions for Android
davidtcdeveloper
0
66
Other Decks in Programming
See All in Programming
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
880
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
950
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
CSC509 Lecture 12
javiergs
PRO
0
160
ヤプリ新卒SREの オンボーディング
masaki12
0
130
CSC509 Lecture 13
javiergs
PRO
0
110
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Jakarta EE meets AI
ivargrimstad
0
190
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Making Projects Easy
brettharned
115
5.9k
Thoughts on Productivity
jonyablonski
67
4.3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Become a Pro
speakerdeck
PRO
25
5k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Docker and Python
trallard
40
3.1k
Rails Girls Zürich Keynote
gr2m
94
13k
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!