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
Android Dev em 2017 - Desenvolvendo para milhõe...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Angelo Castelan
May 28, 2017
Programming
0
29
Android Dev em 2017 - Desenvolvendo para milhões de usuários
Palestra dada no I/O Extended Porto Alegre em 28/05/2017
Angelo Castelan
May 28, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
Package Management Learnings from Homebrew
mikemcquaid
0
230
CSC307 Lecture 06
javiergs
PRO
0
690
CSC307 Lecture 01
javiergs
PRO
0
690
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
280
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
ぼくの開発環境2026
yuzneri
0
240
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
750
CSC307 Lecture 04
javiergs
PRO
0
660
AI時代の認知負荷との向き合い方
optfit
0
170
AI & Enginnering
codelynx
0
120
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Side Projects
sachag
455
43k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
330
Crafting Experiences
bethany
1
52
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
920
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
Transcript
Android Dev em 2017 Desenvolvendo para milhões de usuários @castelanjr
None
POR QUE? ⭐⭐⭐⭐⭐
Código Limpo == Código Testável
MVC MVP MVVM
Model View Presenter • Model: entidades, repositórios e ações do
app • View: interface passiva que mostra os dados e chama o Presenter nos comandos do usuário • Presenter: controla o model e o apresenta na view
View Presenter Model Eventos do Usuário Atualiza Model Mudança de
estado Atualiza View
Model View ViewModel • Model: entidades, repositórios e ações do
app • View: a UI • ViewModel: uma abstração da View com propriedades e comandos • Data Binding: sincroniza View e ViewModel
View ViewModel Model DataBinding Atualiza Model Mudança de estado
Não existe a opção correta!
Unit Tests UI Tests
JUnit
Mockito
Robolectric
Espresso
Android Architecture Blueprints https://github.com/googlesamples/android-architecture
Operações Assíncronas
Callback Hell }); }); }); }); }); }); }); });
}); });
RxJava • Reactive Extensions para a JVM • Gerenciamento de
programas assíncronos e baseados em eventos usando sequências de Observables • Programação Funcional
RxJava uploader.uploadFile(file) .flatMap { data -> entryRepository.createEntry(data) } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ entry -> showEntry(entry) }, { throwable -> Log.e(TAG, "Erro no upload", throwable) showErrorMessage() })
RxJava uploader.uploadFile(file) .flatMap { data -> entryRepository.createEntry(data) } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ entry -> showEntry(entry) }, { throwable -> Log.e(TAG, "Erro no upload", throwable) showErrorMessage() })
RxJava uploader.uploadFile(file) .flatMap { data -> entryRepository.createEntry(data) } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ entry -> showEntry(entry) }, { throwable -> Log.e(TAG, "Erro no upload", throwable) showErrorMessage() })
RxJava uploader.uploadFile(file) .flatMap { data -> entryRepository.createEntry(data) } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ entry -> showEntry(entry) }, { throwable -> Log.e(TAG, "Erro no upload", throwable) showErrorMessage() })
RxJava uploader.uploadFile(file) .flatMap { data -> entryRepository.createEntry(data) } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ entry -> showEntry(entry) }, { throwable -> Log.e(TAG, "Erro no upload", throwable) showErrorMessage() })
A própria linguagem!
Kotlin • Moderna, divertida, madura, robusta • 100% interoperável com
Java • Funcional • Tipagem estática e null safe • Melhor linguagem de todas
Null Safety var nonNullString: String = "Striiiiing" nonNullString = null
// Não compila!
Null Safety val nullValue: String? = null nullValue.length // Não
compila!
Null Safety val nullValue: String? = null nullValue?.length //
Default Parameters fun sayHello(name: String = "Walter White") { println("Hello,
$name!") } sayHello("Donald Draper") sayHello()
Data Classes data class User(val id: Long, val username: String,
val name: String, val followers: Long, val following: Long)
Extension Functions fun String?.isNullOrEmpty(): Boolean { return this == null
|| this.isEmpty() } "".isNullOrEmpty()
Oficializada pelo Google!
Processo Constante
Obrigado! @castelanjr