Dependency Injection basics Fun Fun Function
Dependency injection (here shown using JavaScript) is a software design pattern that is primarily to make code unit testable, by moving the responsibility for getting dependencies outside the code that depends on it. It does require some restructuring of your application, which feels a bit wrong to do just to get testability, but its an otherwise remarkably simple pattern that gets the job done.
|
|