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
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
手動DIの教訓
Cybozu Mobile Meetup 2023.10.27で登壇したLTのスライド資料です。
https://cybozu.connpass.com/event/299246/
mkeeda
October 27, 2023
More Decks by mkeeda
See All by mkeeda
Google I/O 2026 個人的に気になりトピック
mkeeda
0
33
アジャイル & スクラム入門
mkeeda
0
210
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
5.6k
Android StudioのAIコーディングツール、 ぶっちゃけどうなん???
mkeeda
0
660
DataStoreをテストする
mkeeda
0
610
時計仕掛けのCompose
mkeeda
1
580
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
1k
WebViewと向き合う
mkeeda
2
1.7k
お気に入りのAndroid Studio小技集
mkeeda
0
420
Other Decks in Programming
See All in Programming
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
120
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
T3DD26: From RAGs to Riches
martinhelmich
0
120
typoなんかねぇよ
raspython3
0
620
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
270
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
470
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
160
Oxlintはいいぞ(続)
yug1224
1
490
My Marp Sample
sinoue0108
0
130
ALB ログから Trace を気合で繋げる技術
fohte
7
780
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
120
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
740
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
400
Marketing to machines
jonoalderson
1
5.7k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
How to build a perfect <img>
jonoalderson
1
5.9k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
910
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
480
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
630
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
230
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
A Tale of Four Properties
chriscoyier
163
24k
Embracing the Ebb and Flow
colly
88
5.1k
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