Dependency injection as a technique is something we have been practicing since early in this book. To reiterate, the idea behind dependency injection is that we push dependencies into an object from the outside. This is as opposed to creating dependency objects while inside a class via the new keyword, or reaching out of the current scope to bring in dependencies via the globals
keyword.
Note
For an overview of inversion of control in general and dependency injection in specific, read Fowler's article on containers at http://martinfowler.com/articles/injection.html.
To accomplish our dependency injection activities, we have been manually creating the necessary objects in a page script. For any object that needed a dependency, we created that dependency first, then we created the object that depended on it and passed in the dependency. This creation process has sometimes been deeply layered, as when the dependencies have dependencies. Regardless of the...