Part 3. DIY DI
In chapter 1, I gave a short outline of the three dimensions of DI: Object Composition, Lifetime Management, and Interception. In this part of the book, I expand this viewpoint into three distinct chapters. Many DI Containers have features that directly relate to these dimensions. Some provide features in all three dimensions, whereas others only support some of them.
However, because a DI Container is an optional tool, I feel that it’s more important to explain the underlying principles and techniques that containers typically use to implement these features. Part 3 examines how you can do-it-yourself instead of using a DI Container. You can potentially use this information to build your own DI Container (but please don’t—the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access