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
190
手動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
320
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
540
WebViewと向き合う
mkeeda
2
1.2k
お気に入りのAndroid Studio小技集
mkeeda
0
320
Scalable UI testing solutions かんたんまとめ
mkeeda
0
1k
5分で分かるビルドロジック共通化の今
mkeeda
1
1.4k
Compose で手に入れた UI の Unit test
mkeeda
3
1.8k
Jetpack Compose 完全に理解した
mkeeda
1
3.5k
5分でわかるCompose Modifiers deep dive
mkeeda
1
1k
Other Decks in Programming
See All in Programming
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
210
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
190
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
770
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
860
楽しく向き合う例外対応
okutsu
0
760
Domain-Driven Design (Tutorial)
hschwentner
13
22k
AIプログラミング雑キャッチアップ
yuheinakasaka
20
5.4k
The Clean ArchitectureがWebフロントエンドでしっくりこないのは何故か / Why The Clean Architecture does not fit with Web Frontend
twada
PRO
62
20k
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
140
SwiftUI移行のためのインプレッショントラッキング基盤の構築
kokihirokawa
0
190
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
260
高セキュリティ・高耐障害性・サブシステム化。そして2億円
tasukulab280
1
330
Featured
See All Featured
Visualization
eitanlees
146
15k
KATA
mclloyd
29
14k
Navigating Team Friction
lara
183
15k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Optimizing for Happiness
mojombo
377
70k
Side Projects
sachag
452
42k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
The Language of Interfaces
destraynor
156
24k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Done Done
chrislema
182
16k
Facilitating Awesome Meetings
lara
53
6.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
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