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
0
110
Whats new in Android Media?
myolwin00
2
310
MasteringDaggerWithHiltOnAndroid
myolwin00
0
150
BritishUniversityCollegeEventSlides.pdf
myolwin00
0
25
Road to become an Android Developer
myolwin00
1
360
Other Decks in Programming
See All in Programming
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
950
Git Rebase
bkuhlmann
11
1.6k
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
850
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
160
Milestoner
bkuhlmann
1
410
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
2
200
Snowflakeで眠ったデータを起こそう!
estie
0
130
Elm Form Validation
bkuhlmann
0
510
Try creating your own orderedmap
kazamori
1
150
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
1.1k
Apache Hive 4 on Treasure Data
ryukobayashi
0
400
敵対的ポイフル
futabato
0
120
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
Done Done
chrislema
178
15k
Building Applications with DynamoDB
mza
88
5.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Become a Pro
speakerdeck
PRO
12
4.6k
Side Projects
sachag
451
41k
Ruby is Unlike a Banana
tanoku
96
10k
Six Lessons from altMBA
skipperchong
22
3k
Making Projects Easy
brettharned
109
5.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
21
1.4k
Designing with Data
zakiwarfel
96
4.8k
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