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
250
手動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
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
5.4k
Android StudioのAIコーディングツール、 ぶっちゃけどうなん???
mkeeda
0
340
DataStoreをテストする
mkeeda
0
510
時計仕掛けのCompose
mkeeda
1
460
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
820
WebViewと向き合う
mkeeda
2
1.5k
お気に入りのAndroid Studio小技集
mkeeda
0
370
Scalable UI testing solutions かんたんまとめ
mkeeda
0
1.2k
5分で分かるビルドロジック共通化の今
mkeeda
1
1.7k
Other Decks in Programming
See All in Programming
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
150
GoLab2025 Recap
kuro_kurorrr
0
790
Basic Architectures
denyspoltorak
0
140
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.9k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
320
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
210
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
680
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
560
Implementation Patterns
denyspoltorak
0
140
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.5k
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
230
開発に寄りそう自動テストの実現
goyoki
2
1.6k
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
110
So, you think you're a good person
axbom
PRO
0
1.9k
Why Our Code Smells
bkeepers
PRO
340
58k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
34
Between Models and Reality
mayunak
0
150
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
210
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
We Are The Robots
honzajavorek
0
130
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