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
200
手動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
DataStoreをテストする
mkeeda
0
360
時計仕掛けのCompose
mkeeda
1
380
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
660
WebViewと向き合う
mkeeda
2
1.3k
お気に入りのAndroid Studio小技集
mkeeda
0
340
Scalable UI testing solutions かんたんまとめ
mkeeda
0
1.1k
5分で分かるビルドロジック共通化の今
mkeeda
1
1.5k
Compose で手に入れた UI の Unit test
mkeeda
3
2k
Jetpack Compose 完全に理解した
mkeeda
1
3.7k
Other Decks in Programming
See All in Programming
CSC307 Lecture 17
javiergs
PRO
0
110
社内での開発コミュニティ活動とモジュラーモノリス標準化事例のご紹介/xPalette and Introduction of Modular monolith standardization
m4maruyama
1
120
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
180
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
160
「兵法」から見る質とスピード
ickx
0
270
Java on Azure で LangGraph!
kohei3110
0
120
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
110
FormFlow - Build Stunning Multistep Forms
yceruto
1
160
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
Haskell でアルゴリズムを抽象化する / 関数型言語で競技プログラミング
naoya
17
4.5k
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
810
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
930
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
The Language of Interfaces
destraynor
158
25k
KATA
mclloyd
29
14k
Done Done
chrislema
184
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
43
2.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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