November 2018
Intermediate to advanced
346 pages
8h 12m
English
After examining one of the most unique forms of dependency injection (DI), monkey patching, in this chapter, we take it to the other extreme and look at perhaps the most normal or traditional, constructor injection.
While constructor injection is so ubiquitous that you may even have used it without realizing it, it has many subtleties, particularly concerning advantages and disadvantages, that bear examination.
Similar to the previous chapter, we will apply this technique to our sample service, where we will reap significant improvements.
The following topics will be covered in this chapter:
Read now
Unlock full access