6 ms·
It is a pattern where you inject the dependencies of a class into it rather than create the instances of the dependencies within the class. for more info --> ht
by ngc248 4y ago
It is a pattern where you inject the dependencies of a class into it rather than create the instances of the dependencies within the class. for more info --> https://en.wikipedia.org/wiki/Dependency_injection https://en.wikipedia.org/wiki/Dependency_injection
it makes the code cleaner and testable.
- everybodyknows 4y agoWhat I find troubling about that page is that it does not qualify up front whether the dependencies are: A. Also depended upon by other, coequal unrelated classes, possibly maintained by others, OR B. Depended upon only by a single class (of higher functionality) Situation A is sometimes called a portability interface; B might be called an internal structuring interface. The difference has crucial implications for social power relationships between the human developers and users involved.