August 2016
Intermediate to advanced
286 pages
5h 31m
English
At this point, all of our classes and functions have been consolidated to a central location, and all related include statements have been removed. We would prefer to start writing tests for our classes, but it is very likely that we have a lot of global variables embedded in them. These can cause a lot of trouble via action at a distance where modifying a global in one place changes its value in another place. The next step, then, is to remove all uses of the global keyword from our classes, and inject the necessary dependencies instead.
What Is Dependency Injection?
Dependency injection means that we push our dependencies into a class from the outside, instead of pulling them into a class ...
Read now
Unlock full access