~/talk

Dependency injection made simple

Talkat 360|AnDev 2016 · 2016-07-28..07-29· [android]
slides:none on file

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

  1. 0:00Introduction
  2. 0:41What is a dependency
  3. 1:56What is dependency injection
  4. 3:59Share dependencies
  5. 4:34Configure dependencies externally
  6. 5:55Dependency inversion principle
  7. 6:38What are dependencies
  8. 7:15Application example
  9. 9:43Inversion
  10. 11:59Testing
  11. 12:54Debugging
  12. 13:44Drawbacks
  13. 14:37Dependency injection and dependency inversion
  14. 15:11Dagger dependency injection
  15. 17:34Dagger
  16. 19:42Simple object graph
  17. 20:35Create object graph
  18. 21:18Parameterless constructor
  19. 21:32greeter
  20. 21:57inject annotations
  21. 22:48inject member field
  22. 23:37providers
  23. 25:16ProvideText
  24. 26:12Providing interfaces
  25. 27:42Object graph
  26. 28:27Runtime
  27. 29:07Module annotations
  28. 29:48Default module library
  29. 30:12Singletons
  30. 30:31Lazy Injection
  31. 31:03Qualifiers
  32. 31:45Android
  33. 33:23Dagger Proguard
  34. 33:47Android Injection
  35. 35:08You 2020
  36. 35:50Conclusion
  37. 36:06Why not upgrade to Dagger 2
  38. 37:56Overrides
  39. 38:46Constructor injection
  40. 39:42List of dependencies
  41. 40:04Packages and interfaces
  42. 40:18Module structure
  43. 40:42Dependency injector
~/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.