~/talk

Let's Build a Dependency Injection Framework

Talkat droidcon SF 2019 · 2019-11-18..11-19· [software-architecture]
links:none on file
slides:none on file

Live codes a DI system implemented as an annotation processor that uses JavaPoet to generate a concrete scope implementation at compile time, producing provider methods named from return types, resolving constructor parameters by calling other provider methods, and adding per-type private fields plus null-checked assignments to implement caching so repeated requests return the same instance. The processor writes generated classes to the filer so they compile with the app. Mentions Motif and a claimed 75% reduction in DI boilerplate.

AI-written summary · about

  1. 0:00Introduction and goals
  2. 1:14Setting up the project
  3. 3:19Defining the DI API
  4. 7:46Writing the annotation processor
  5. 12:39Generating the implementation class
  6. 15:31Overriding access methods
  7. 18:18Implementing provider methods
  8. 23:18Resolving dependencies
  9. 25:48Adding caching logic
  10. 29:22Testing the generated code
  11. 30:49Final thoughts and alternatives
~/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.