~/talk

Fundamentals of Dependency Injection

Talkat droidcon New York 2025 · 2025-06-25..06-26· [software-architecture, android]
github:rharter
slides:none on file

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

  1. 0:00Introduction
  2. 1:25Dependency injection complexity
  3. 2:54Dependency tree complexity
  4. 5:23Object graph basics
  5. 7:34Constructor injection
  6. 9:22Factories and object graph
  7. 11:07Bootstrapping object graph
  8. 14:17Factories in DI frameworks
  9. 16:30Providers role
  10. 19:01Managing object lifetime
  11. 24:31Qualifiers for dependencies
  12. 30:57Child graphs and subcomponents
  13. 38:29Summary
~/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.