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
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
手動DIの教訓
Cybozu Mobile Meetup 2023.10.27で登壇したLTのスライド資料です。
https://cybozu.connpass.com/event/299246/
mkeeda
October 27, 2023
More Decks by mkeeda
See All by mkeeda
アジャイル & スクラム入門
mkeeda
0
180
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
5.5k
Android StudioのAIコーディングツール、 ぶっちゃけどうなん???
mkeeda
0
580
DataStoreをテストする
mkeeda
0
590
時計仕掛けのCompose
mkeeda
1
560
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
940
WebViewと向き合う
mkeeda
2
1.6k
お気に入りのAndroid Studio小技集
mkeeda
0
400
Scalable UI testing solutions かんたんまとめ
mkeeda
0
1.4k
Other Decks in Programming
See All in Programming
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
さぁV100、メモリをお食べ・・・
nilpe
0
150
Oxcを導入して開発体験が向上した話
yug1224
4
330
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.5k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
580
ふつうのFeature Flag実践入門
irof
8
4.1k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
390
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
370
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
Inside Stream API
skrb
1
760
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
30 Presentation Tips
portentint
PRO
1
330
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
Optimizing for Happiness
mojombo
378
71k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
The Language of Interfaces
destraynor
162
27k
How STYLIGHT went responsive
nonsquared
100
6.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Building Adaptive Systems
keathley
44
3.1k
How to build a perfect <img>
jonoalderson
1
5.7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
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