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
220
手動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.3k
Android StudioのAIコーディングツール、 ぶっちゃけどうなん???
mkeeda
0
230
DataStoreをテストする
mkeeda
0
470
時計仕掛けのCompose
mkeeda
1
420
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
770
WebViewと向き合う
mkeeda
2
1.4k
お気に入りのAndroid Studio小技集
mkeeda
0
350
Scalable UI testing solutions かんたんまとめ
mkeeda
0
1.2k
5分で分かるビルドロジック共通化の今
mkeeda
1
1.6k
Other Decks in Programming
See All in Programming
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
4.4k
明日から始めるリファクタリング
ryounasso
0
110
CSC509 Lecture 01
javiergs
PRO
1
430
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
590
CSC305 Lecture 04
javiergs
PRO
0
250
CSC509 Lecture 06
javiergs
PRO
0
240
Serena MCPのすすめ
wadakatu
4
900
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3k
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
180
AIエージェント時代における TypeScriptスキーマ駆動開発の新たな役割
bicstone
4
1.5k
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
メモリ不足との戦い〜大量データを扱うアプリでの実践例〜
kwzr
1
860
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
51k
BBQ
matthewcrist
89
9.8k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Gamification - CAS2011
davidbonilla
81
5.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Done Done
chrislema
185
16k
How STYLIGHT went responsive
nonsquared
100
5.8k
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