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
手動DIの教訓
Search
mkeeda
October 27, 2023
Programming
0
170
手動DIの教訓
Cybozu Mobile Meetup 2023.10.27で登壇したLTのスライド資料です。
https://cybozu.connpass.com/event/299246/
mkeeda
October 27, 2023
Tweet
Share
More Decks by mkeeda
See All by mkeeda
時計仕掛けのCompose
mkeeda
1
110
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
500
WebViewと向き合う
mkeeda
2
1.2k
お気に入りのAndroid Studio小技集
mkeeda
0
310
Scalable UI testing solutions かんたんまとめ
mkeeda
0
980
5分で分かるビルドロジック共通化の今
mkeeda
1
1.3k
Compose で手に入れた UI の Unit test
mkeeda
3
1.8k
Jetpack Compose 完全に理解した
mkeeda
1
3.4k
5分でわかるCompose Modifiers deep dive
mkeeda
1
970
Other Decks in Programming
See All in Programming
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
1
220
Spring gRPC について / About Spring gRPC
mackey0225
0
140
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
370
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
140
ErdMap: Thinking about a map for Rails applications
makicamel
1
1k
ファインディの テックブログ爆誕までの軌跡
starfish719
1
710
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
210
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
410
Swiftコンパイラ超入門+async関数の仕組み
shiz
0
190
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
1
400
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
140
Amazon Nova Reelの可能性
hideg
0
250
Featured
See All Featured
Speed Design
sergeychernyshev
25
750
Faster Mobile Websites
deanohume
305
30k
Designing Experiences People Love
moore
139
23k
Producing Creativity
orderedlist
PRO
343
39k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Writing Fast Ruby
sferik
628
61k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
510
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Transcript
DI Cybozu Mobile Meetup 20 23 . 1 0 .
27 (@mr_mkeeda)
About me X/Twitter: @mr_mkeeda Github: @mkeeda Android Engineer at Cybozu,
Inc kintone AC 6 2
DI (Manual Dependency Injection) 3 rd perty DI 3 class
RemoteDataSource { // ... } class Repository( private val remoteDataSource: RemoteDataSource ) { // ... } class Component { private val remoteDataSource = RemoteDataSource() val repository = Repository(remoteDataSource) }
DI https://developer.android.com/training/dependency-injection/ manual 4
:app 5 Class A Class B
:app 6 Component B Class A Class B Component A
& & Class B
:app 7 SingletonComponent Class A Class B singleton Component A
Application &
:module-b :module-a 8 SingletonComponent Class A Class B singleton Component
A :shared
DI 9
:module-b :module-a 10 SingletonComponent Class A Class B singleton Component
A :shared
:module-b :shared :module-a 11 SingletonComponent Class A Class B singleton
Component A
:shared :module-a 12 SingletonComponent Class A C Component A :module-c
Class C Component C Class A singleton
:shared :module-a 13 SingletonComponent Class A C Component A :module-c
Class C Component C Class A singleton 🔄
14
:shared :module-a SingletonComponent Class A C Component A :module-c Class
C Component C Class A singleton 🔄 15 Component
:shared Interface Module B singleton :module-b :module-a 16 SingletonComponent Class
A Class B singleton Component A Class A singleton 🔄 Component
:module-b :shared :module-a 17 SingletonComponent Impl Class A Class B
singleton Component A Class A singleton Interface Module B singleton Component
DI 18 :module-b :app :module-a SingletonComponent Impl Class A Class
B singleton Component A :module-c Class C Component C Class A singleton Interface Module B singleton Interface Module A singleton SingletonComponent
DI Component lateinit, Type cast Component 19
DI Hilt Koin DI DI E 2 E 20
DI DI DI 21
22
kintone Android 1 . DI DI 2 . 23