~/talk

Build your own Dependency Injection framework!

slides:none on file

Builds a tiny DI framework called the Injectinator using Java reflection and Maven on Java 8/11/15, proving the magic is just code. It defines a @InjectMe annotation with runtime retention and targets for constructor field and method use, a Syringe that maps interfaces to implementation classes, and recursive resolution for nested dependencies. It implements constructor field and setter injection and toggles InjectionType enum between singleton and new instances; the demo logger injection works as expected.

AI-written summary · about

  1. 0:00Dependency Injection intro
  2. 3:04Reflection in Java
  3. 4:51InjectMe annotation
  4. 6:15Syringe configuration
  5. 10:51Injectinator core
  6. 13:21Field injection
  7. 16:51Constructor injection
  8. 20:00Setter injection
  9. 24:55Singleton vs new instance
  10. 27:01Adding singleton support
  11. 30:14Conclusion & Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.