yegor256 / elegantobjects.github.io

Fan club for Elegant Objects programmers
https://www.elegantobjects.org
121 stars 66 forks source link

added principle for DI #26

Closed ghost closed 6 years ago

ghost commented 6 years ago

@yegor256 I wasn't entirely sure about this one. Your article mentions DI containers in particular, not really DI in general. I'm still uncertain which side of the fence you're on with that...

I don't see it listed anywhere here either

0crat commented 6 years ago

@yegor256/z please, pay attention to this pull request

0crat commented 6 years ago

Job #26 is now in scope, role is REV

yegor256 commented 6 years ago

@ashtonhogan we are against DI containers, not DI by itself

ghost commented 6 years ago

@yegor256 why? DI is a Martin Fowler thing, I have my doubts. Can you reference any OOP experts saying DI is good?

See this answer. Many concepts that violate encapsulation you've already ruled out in Elegant Objects, I don't see why an exception should be made for DI?

yegor256 commented 6 years ago

@ashtonhogan you can find more information here: http://www.yegor256.com/2014/10/03/di-containers-are-evil.html

0crat commented 6 years ago

The job #26 is now out of scope