Why does one use dependency injection?
First, I want to explain an assumption that I make for this answer. It is not always true, but quite often: Interfaces are adjectives; classes are nouns. (Actually, there are interfaces that are nouns as well, but I want to generalize here.) So, e.g. an interface may be something such as IDisposable, IEnumerable or IPrintable. … Read more