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
63
Creating Great APIs With Kotlin
davidtcdeveloper
0
21
Android & Docker
davidtcdeveloper
0
48
What's new in AGP 3.0
davidtcdeveloper
0
46
Pleasantly Fast Gradle Builds
davidtcdeveloper
3
180
Reactive and Functional Programming
davidtcdeveloper
0
99
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
Introduction to C Extensions
sylph01
3
130
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
150
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
370
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
260
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
700
若手バックエンドエンジニアが Elasticsearch を使ってみた話
hott0mott0
1
100
PRレビューのお供にDanger
stoticdev
1
250
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
660
GoとPHPのインターフェイスの違い
shimabox
2
220
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
120
自力でTTSモデルを作った話
zgock999
0
130
読まないコードリーディング術
hisaju
1
140
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.6k
Code Review Best Practice
trishagee
67
18k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
A better future with KSS
kneath
238
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
390
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
For a Future-Friendly Web
brad_frost
176
9.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Making Projects Easy
brettharned
116
6k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
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!