Settings

Theme

Was DI is dumb idea?

medium.com

3 points by StokeMasterJack 4 years ago · 3 comments

Reader

techdragon 4 years ago

Well this at least makes it more clear what the heck they were intended to solve... since I've done the bulk of my career with Python I've been blissfully ignorant of such things. Coming to C# it was a rather abrupt discovery that so many things I would just do with metaprogramming via class constructor parameters and passing arguments into the class object at creation time, were being done via complex dependency injection as if more simple mechanisms weren't available...

Good history lesson at least.

panny 4 years ago

At least one early DI evangelist thinks so,

https://paulhammant.com/2018/04/10/it-turns-out-we-didnt-nee...

dith3r 4 years ago

Function encapsulated as class. Dependencies passed via constructor. Single public method to execute 'function'.

Di as a single class with cake pattern using lazy properties for defining injectable objects. The most important - main function as application entry point.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection