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
130
手動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
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
340
WebViewと向き合う
mkeeda
2
980
お気に入りのAndroid Studio小技集
mkeeda
0
270
Scalable UI testing solutions かんたんまとめ
mkeeda
0
840
5分で分かるビルドロジック共通化の今
mkeeda
1
910
Compose で手に入れた UI の Unit test
mkeeda
3
1.5k
Jetpack Compose 完全に理解した
mkeeda
1
3.1k
5分でわかるCompose Modifiers deep dive
mkeeda
1
860
みんなで準備するスポンサー
mkeeda
0
210
Other Decks in Programming
See All in Programming
実践 Advanced CallKit 〜快適な通話の実現に向けて〜
mot_techtalk
3
140
What you can do with Ruby on WebAssembly
kateinoigakukun
0
160
Architecture Decision Record (ADR)
nearme_tech
PRO
1
680
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
800
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.7k
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
Lessons by WebAssembly app in production on CDN Edge Computing Service
tetsuharuohzeki
0
210
Amazon BedrockでサーバレスなAIお料理ボットを作成する!!
tosuri13
0
220
What is Parser
yui_knk
9
4.1k
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
410
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
270
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
530
Featured
See All Featured
A Tale of Four Properties
chriscoyier
155
22k
Speed Design
sergeychernyshev
22
430
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
Clear Off the Table
cherdarchuk
91
320k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
230
130k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
Ruby is Unlike a Banana
tanoku
96
11k
Code Review Best Practice
trishagee
62
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
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