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
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
490
WebViewと向き合う
mkeeda
2
1.1k
お気に入りのAndroid Studio小技集
mkeeda
0
310
Scalable UI testing solutions かんたんまとめ
mkeeda
0
970
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
960
みんなで準備するスポンサー
mkeeda
0
250
Other Decks in Programming
See All in Programming
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
28
4.1k
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
Androidアプリの One Experience リリース
nein37
0
1.2k
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
Amazon Nova Reelの可能性
hideg
0
200
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Producing Creativity
orderedlist
PRO
343
39k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Typedesign – Prime Four
hannesfritz
40
2.5k
Site-Speed That Sticks
csswizardry
2
270
Being A Developer After 40
akosma
89
590k
How STYLIGHT went responsive
nonsquared
96
5.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
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