Demystifying Dependency Injection Containers
summary
Builds a minimal DI container (a bindings array plus set/get), registers factories that accept the container, and demonstrates container get recursion resolving transitive dependencies down to a base case that simply does new Logger. Then adds reflection-based autowiring: inspect constructor types, recursively build parameters, and call newInstanceArgs. The implementation runs end-to-end in the demo and successfully constructs complex object graphs with very little code.
AI-written summary · about
chapters (10)
- 0:00Introduction to DI
- 0:39Dependency injection basics
- 3:33The need for containers
- 5:24Building a simple container
- 9:13Recursive dependency resolution
- 12:51Tracing container execution
- 16:14Introduction to auto wiring
- 17:37Implementing auto wiring
- 21:04Reflection in action
- 23:43Limitations and conclusion
related talks
45mInversion of Control Containers Beyond Constructor Injection
57mDependency Injection for Mere Humans
38mIOC container beyond constructor injection
55m.NET Core Dependency Injection – The Booster Jab
01h 00mDad, how are Service Containers born?
24mDependency Injection at Scale
02h 23mMastering Symfony 4's Dependency Injection
01h 02mRefactoring C++ Code for Unit testing with Dependency Injection
