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
tomoya-kamaji
May 22, 2022
Technology
0
920
メンヘラコードをDIを使って駆逐する
tomoya-kamaji
May 22, 2022
Tweet
Share
More Decks by tomoya-kamaji
See All by tomoya-kamaji
デザインドックから学ぶ開発手法
tomoyakamaji
0
790
Clean Architecture ~ 達人に学ぶソフトウェア構造と設計
tomoyakamaji
0
990
複雑な検索処理をElasticSearchで駆逐する
tomoyakamaji
0
1.1k
Other Decks in Technology
See All in Technology
Lambda Web Adapterについて自分なりに理解してみた
smt7174
4
120
HiMoR: Monocular Deformable Gaussian Reconstruction with Hierarchical Motion Representation
spatial_ai_network
0
110
生まれ変わった AWS Security Hub (Preview) を紹介 #reInforce_osaka / reInforce New Security Hub
masahirokawahara
0
110
本が全く読めなかった過去の自分へ
genshun9
0
560
Prox Industries株式会社 会社紹介資料
proxindustries
0
320
Microsoft Build 2025 技術/製品動向 for Microsoft Startup Tech Community
torumakabe
2
290
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
2
220
How Community Opened Global Doors
hiroramos4
PRO
1
120
Clineを含めたAIエージェントを 大規模組織に導入し、投資対効果を考える / Introducing AI agents into your organization
i35_267
4
1.6k
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
230
監視のこれまでとこれから/sakura monitoring seminar 2025
fujiwara3
11
3.9k
Javaで作る RAGを活用した Q&Aアプリケーション
recruitengineers
PRO
1
120
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Designing Experiences People Love
moore
142
24k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Designing for humans not robots
tammielis
253
25k
Balancing Empowerment & Direction
lara
1
380
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Building Applications with DynamoDB
mza
95
6.5k
Embracing the Ebb and Flow
colly
86
4.7k
GraphQLとの向き合い方2022年版
quramy
48
14k
Documentation Writing (for coders)
carmenintech
72
4.9k
Transcript
DI
(27) 2018/4 Sier 2021/6 Another works
ෳۀΛ͍ͨ͠ਓͱෳۀਓࡐΛొ༻͍ͨ͠اۀ༷Λͭͳ͙ ϚονϯάϓϥοτϑΥʔϜ հखྉͳ͠ɺఆֹͰ࠾༻͠์
DI
λεΫొΫϥε $SFBUF5BTL6TF$BTF .Z42-ʹӬଓԽ͢ΔΫϥε .Z4RM3FQPTJUPZ ͱ͘Μ ·͍ͪΌΜ ɾ·͍ͪΌΜͷมԽʹͱ͘Μ͕ ɹӨڹΛड͚Δ
ɾ·͍ͪΌΜʹґଘ͗ͯ͢͠ɺ·͍ ɹͪΌΜ͔ΒΓ͑ΒΕͳ͍ ɾ%#ొΫϥεͷมԽʹλεΫొΫϥε͕ ɹӨڹΛड͚Δ ɾ.Z42-͔ΒΓ͑ΒΕͳ͍
None
ᶃ λεΫొ͢ΔৼΔ͍Λද͍͕ͨ͠03.ͷ͕ࣝ͋ͬͯ ɹॲཧ͕ಡΈͮΒ͍ ᶄ ಛఆͷ03.%#ʹґଘͨ͠ॲཧʹͳ͍ͬͯΔ
ᶃ λεΫొ͢ΔৼΔ͍Λද͍͕ͨ͠03.ͷ͕ࣝ͋ͬͯ ɹॲཧ͕ಡΈͮΒ͍ ͬͨ ᶄ ಛఆͷ03.%#ʹґଘͨ͠ॲཧʹͳ͍ͬͯΔ ˠ.Z4RMͷ͕ࣝVTF$BTFʹ࿙Ε͍ͯΔ ґଘ͍ͯ͠Δ
MySQL Radis MySQL
Radis ଞʹӬଓԽઌ͕૿͑ͨΒɺɺɺ JGจ͕૿͑·͘Δ ՃΕ͕ൃੜ͢Δ λεΫొΫϥε $SFBUF5BTL6TF$BTF .Z4RM
3FQPTJUPSZ 3BEJT 3FQPTJUPSZ ɺɺɺɺ
λεΫొΫϥε $SFBUF5BTL6TF$BTF .Z4RM 3FQPTJUPSZ 3BEJT 3FQPTJUPSZ ɺɺɺɺ
*5BTL3FQPTJUPSZ *OUFSGBDF5BTL3FQPTJUPSZ MySqlReposity RadisRepsotory (interface) (DI) JGذ͕ͳ͘ͳΔ ಛఆͷ%#ʹґଘ͠ͳ͍
DI( ) - - ( mock ) - ( )
- interface