~/talk

Readers vs Constructors: Dependency Injection showdown

Talkat Scala Days Copenhagen 2017 · 2017-05-30..06-02· [scala, software-architecture]
slides:none on file

Argues that dependency injection is just passing parameters and demonstrates it by building an in-memory key‑value store (ConcurrentHashMap + Futures), a food storage, a fridge/cooker and an IoT notifier, then refactors to show effect tracking by moving the key‑value dependency into a function and wrapping it as the Reader monad. Shows how constructor-based DI hides implementation details, how to combine both, and compares tooling like MacWire and Guice (mentions Play, Scaldi, SubCut). Recommends start with plain Scala wiring.

AI-written summary · about

  1. 0:00Introduction
  2. 0:58Dependency Injection
  3. 3:33What you dont need
  4. 4:30Who is Adam
  5. 5:20KeyValue Store
  6. 6:41Food Storage
  7. 8:23Add Food
  8. 18:30Class Parameters
  9. 23:30Compile Time Error
  10. 23:53Create IOT dependency
  11. 26:33Change method signature
  12. 32:03Reader monad
  13. 35:41Remove function
  14. 41:11Tracking effects
  15. 43:01Combining the two
  16. 44:11Summary
~/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.