Fundamentals of Dependency Injection
summary
Argues that dependency injection itself, not Dagger, is the hard part and breaks the problem into concrete pieces: an object graph as a component (Dagger calls it component/Hilt uses ViewModelStore), generated providers not factories that can memoize instances for singleton-like lifetime, qualifiers for disambiguating strings (session ID vs API key), and child graphs/subcomponents for per-user wiring; shows the session ID bug from naive providers and recommends letting the DI compiler generate the plumbing.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:25Dependency injection complexity
- 2:54Dependency tree complexity
- 5:23Object graph basics
- 7:34Constructor injection
- 9:22Factories and object graph
- 11:07Bootstrapping object graph
- 14:17Factories in DI frameworks
- 16:30Providers role
- 19:01Managing object lifetime
- 24:31Qualifiers for dependencies
- 30:57Child graphs and subcomponents
- 38:29Summary








