Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rr808
on Jan 8, 2023
|
parent
|
context
|
favorite
| on:
The problem with dependency injection frameworks
The alternative of wiring up your own dependencies is pretty trivial and I really prefer it. Martin Fowler calls it a Service Locator,
https://martinfowler.com/articles/injection.html#UsingAServi...
throwaway_au_1
on Jan 8, 2023
|
next
[–]
FWIW a fellow who has published books on the topic calls Service Locator an anti-pattern[1]. I take no position here as usage of any pattern is contextual but it's worth a read.
[1]
https://blog.ploeh.dk/2010/02/03/ServiceLocatorisanAnti-Patt...
rr808
on Jan 9, 2023
|
parent
|
next
[–]
Looks like a strawman, that isn't the ServiceLocator I expect, it looks like he's writing his own DI engine.
molszanski
on Jan 9, 2023
|
prev
[–]
I would prefer manual DI:
https://blog.ploeh.dk/2012/11/06/WhentouseaDIContainer/
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: