November 2018
Intermediate to advanced
346 pages
8h 12m
English
With traditional dependency injection (DI) methods, the parent or calling object supplies the dependencies to the child class. However, there are many cases where the dependencies have a single implementation. In these cases, a pragmatic approach would be to ask yourself, why inject the dependency at all? In this chapter, we will examine just-in-time (JIT) dependency injection, a strategy that gives us many of the benefits of DI, like decoupling and testability, without adding parameters to our constructors or methods.
The following topics will be covered in this chapter:
Read now
Unlock full access