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
210
手動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
380
時計仕掛けのCompose
mkeeda
1
380
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
690
WebViewと向き合う
mkeeda
2
1.3k
お気に入りのAndroid Studio小技集
mkeeda
0
350
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.8k
Other Decks in Programming
See All in Programming
VS Code Update for GitHub Copilot
74th
2
670
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
4
250
すべてのコンテキストを、 ユーザー価値に変える
applism118
4
1.4k
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
900
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
190
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
600
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
240
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
210
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
140
PipeCDのプラグイン化で目指すところ
warashi
1
290
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
97
34k
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
120
Featured
See All Featured
Making Projects Easy
brettharned
116
6.3k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Cult of Friendly URLs
andyhume
79
6.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Scaling GitHub
holman
460
140k
Practical Orchestrator
shlominoach
189
11k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
Visualization
eitanlees
146
16k
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