Dependency Injection: Summary
Table of Contents
Summary
In the example, it is very nice to see how much flexibility dependency injection brings, but it is also seen that it sucks in the form, at least if you want to achieve such a high level of flexibility. Nobody would like to go through the declaration madness when 50 stoppers are needed. That's why you build injector classes, but for that, you need the abstract factories. In the following section about the abstract factories, you can see how the two techniques complement each other and form a powerful tool.