Dependency injection made simple
summary
Claims that dependency injection is a simple, everywhere pattern and demonstrates it with concrete code: a copy example using reader/writer interfaces that gets test doubles working instead of robots and printers, explicit use of Dagger 1 object graphs with @Inject constructors, @Provides modules, Singleton and Lazy scopes and qualifiers, and Android injection via objectGraph.inject to reach framework-created Activities. Shows modules splitting, override/test modules, and explains why the team stays on Dagger 1 rather than upgrading.
AI-written summary · about
chapters (43)
- 0:00Introduction
- 0:41What is a dependency
- 1:56What is dependency injection
- 3:59Share dependencies
- 4:34Configure dependencies externally
- 5:55Dependency inversion principle
- 6:38What are dependencies
- 7:15Application example
- 9:43Inversion
- 11:59Testing
- 12:54Debugging
- 13:44Drawbacks
- 14:37Dependency injection and dependency inversion
- 15:11Dagger dependency injection
- 17:34Dagger
- 19:42Simple object graph
- 20:35Create object graph
- 21:18Parameterless constructor
- 21:32greeter
- 21:57inject annotations
- 22:48inject member field
- 23:37providers
- 25:16ProvideText
- 26:12Providing interfaces
- 27:42Object graph
- 28:27Runtime
- 29:07Module annotations
- 29:48Default module library
- 30:12Singletons
- 30:31Lazy Injection
- 31:03Qualifiers
- 31:45Android
- 33:23Dagger Proguard
- 33:47Android Injection
- 35:08You 2020
- 35:50Conclusion
- 36:06Why not upgrade to Dagger 2
- 37:56Overrides
- 38:46Constructor injection
- 39:42List of dependencies
- 40:04Packages and interfaces
- 40:18Module structure
- 40:42Dependency injector








