Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
手動DIの教訓
Search
mkeeda
October 27, 2023
Programming
330
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
Google I/O 2026 個人的に気になりトピック
mkeeda
0
38
アジャイル & スクラム入門
mkeeda
0
270
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
5.6k
Android StudioのAIコーディングツール、 ぶっちゃけどうなん???
mkeeda
0
690
DataStoreをテストする
mkeeda
0
630
時計仕掛けのCompose
mkeeda
1
590
What's new in Firebase for building gen AI features気になったところ
mkeeda
0
1k
WebViewと向き合う
mkeeda
2
1.7k
お気に入りのAndroid Studio小技集
mkeeda
0
420
Other Decks in Programming
See All in Programming
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
360
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
140
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
410
スマート反転とウェブアクセシビリティ
camiha
0
210
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
450
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
100
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
240
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
540
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
230
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
280
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.4k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
We Have a Design System, Now What?
morganepeng
55
8.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
590
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Odyssey Design
rkendrick25
PRO
2
820
Test your architecture with Archunit
thirion
2
2.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
920
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
530
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
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