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
64
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
チームの境界をブチ抜いていけ
tokai235
0
220
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.2k
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
120
コード生成なしでモック処理を実現!ovechkin-dm/mockioで学ぶメタプログラミング
qualiarts
0
260
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
290
CSC305 Lecture 08
javiergs
PRO
0
280
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
250
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
140
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
7.7k
AI Agent 時代的開發者生存指南
eddie
4
2.1k
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
890
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
630
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Site-Speed That Sticks
csswizardry
13
920
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Being A Developer After 40
akosma
91
590k
What's in a price? How to price your products and services
michaelherold
246
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
A Tale of Four Properties
chriscoyier
161
23k
Gamification - CAS2011
davidbonilla
81
5.5k
Code Reviewing Like a Champion
maltzj
526
40k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
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!