Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
loevborg
10 months ago
|
parent
|
context
|
favorite
| on:
Dependency injection frameworks add confusion
You're right, stateful dependencies like DB handles need to be passed in manually, and that's a bit of extra legwork you need to do.
Charon77
10 months ago
[–]
Just use a static variable to the DB instance / pool, maybe using singletons, so everyone needing it have access.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: