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
The Android Architecture
Search
မျိုးလွင်ဦး
July 09, 2019
Programming
1
150
The Android Architecture
Slides for DroidYangon2019
မျိုးလွင်ဦး
July 09, 2019
Tweet
Share
More Decks by မျိုးလွင်ဦး
See All by မျိုးလွင်ဦး
Android Media3: The Next Generation of Media Playback on Android
myolwin00
1
180
Whats new in Android Media?
myolwin00
2
320
MasteringDaggerWithHiltOnAndroid
myolwin00
0
160
BritishUniversityCollegeEventSlides.pdf
myolwin00
0
27
Road to become an Android Developer
myolwin00
1
360
Other Decks in Programming
See All in Programming
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
110
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
300
Open source software: how to live long and go far
gaelvaroquaux
0
620
Honoをフロントエンドで使う 3つのやり方
yusukebe
4
2.1k
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
480
Introduction to kotlinx.rpc
arawn
0
630
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
150
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.3k
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
110
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
Making Projects Easy
brettharned
116
6k
Documentation Writing (for coders)
carmenintech
67
4.6k
Scaling GitHub
holman
459
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Designing for humans not robots
tammielis
250
25k
Writing Fast Ruby
sferik
628
61k
Docker and Python
trallard
44
3.3k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Being A Developer After 40
akosma
89
590k
It's Worth the Effort
3n
184
28k
Transcript
The Android Architecture @myolwin00
Why do we need this?
Separation of concerns(SoC) • Don’t write all your code in
an Activity or a Fragment • Separate into sections • Encapsulate informations
Issues • Limited resource • UI controllers are not for
business logic • You don't own implementations of Activity and Fragment • Destroyed after configuration changes • Potential memory leaks • Hard to test • Hard to maintain • And extending your app is more difficult
If you shouldn't use app components to store app data
and state, how should you design your app?
Clean Architecture, Chapter 15 “A good software architecture allows the
system to be easy to understand, to develop, to maintain and to implement.”
Common Architectures • MVC • MVP • MVVM • MVI,
Clean Architecture and more…
Model-View-Controller(MVC)
• Describe business logic • Data operation • Define data
manipulation Model • Represent UI components • Display the data from Controller View • Coordinate between View and Model Controller
MVP(Model-View-Presenter)
MVVM(Model-View-ViewModel)
Loaders • AsyncTaskLoader • CursorLoader
Loaders
MVVM with AAC Source: https://developer.android.com/jetpack/docs/guide
ViewModel From AAC • Replace loaders • Manage UI-related data
in a lifecycle conscious way • Survive configuration changes
ViewModel Lifecycle
Useful links • https://github.com/googlesamples/android-architecture • https://github.com/googlesamples/android- architecture-components • https://developer.android.com/jetpack/docs/guide
Thank You ! It’s question time ! @myolwin00