DI Frameworks – some hidden pearls
summary
Compares CDI, Spring, Dagger, HK2 and BonDI with concrete tests: finds BonDI bug: producer ordering is random (ConcurrentHashMap key order causes surprising selection), shows reflection fails on some Java 8 classes, demonstrates prototype and module merge semantics that queue rather than merge, and contrasts annotation‑processing (Dagger) vs runtime reflection (BonDI/Weld) tradeoffs. Publishes a dynamic DI prototype with runtime switching and caching and reports a microbenchmark hitting 3 million injects/sec JIT benchmark to prove feasibility.
AI-written summary · about
chapters (9)
- 0:00Introduction and background
- 4:05Dependency injection basics
- 12:21Life cycle and scopes
- 21:46Qualifiers and alternatives
- 30:50Module and object graph handling
- 37:57Prototypes and deep copies
- 41:29Reflection and annotation processing
- 47:48Dynamic context and performance
- 53:58Choosing the right framework
related talks
59mComparing DI frameworks & internals
32mLet's Build a Dependency Injection Framework
37mAdvanced multi-platform dependency injection
01h 00mFantastic Frameworks and How to Avoid Them
49mSpring, Jakarta EE, CDI and Other Pathologies
47mCDI 2.0 New & Noteworthy
53mDependency Injection Revisited
31mBuild your own Dependency Injection framework!
