Dependency Injection
Dependency Injection generally means passing a dependent object as a parameter to a method, rather than having the method create the dependent object.
What it means in practice is that the method does not have a direct dependency on a particular implementation; any implementation that meets the requirements can be passed as a parameter.
Example
References
Reference | URL |
---|---|
Dependency Injection & Inversion of Control | https://www.youtube.com/watch?v=EPv9-cHEmQw |