Approaches to Dependency Injection in Scala
(aka "99 Ways to DI")
Slides for my lightning talk on dependency injection at Scala Central #5.
Copyright 2017 Dave Gurnell. Licensed CC-BY-SA 3.0.
The Keynote and PDF contain speaker notes to help explain what I'm talking about. You can also find a video of the talk on the Scala Central Youtube channel. Here are the references from the end of the talk.
DI approaches covered in this talk:
- Krzysztof Pado - Dependency injection in Play Framework using Scala
- Macwire User Guide (project README)
- Google Guice User Guide
- Adam Warski - Using Scala traits as modules, or the "Thin Cake" Pattern
- Mark Harrison - Cake Pattern in Depth
- Andrew Rollins - The Cake Pattern in Scala - Self Type Annotations vs. Inheritance
Functional approaches to DI...
- Mark Seemann - Dependency injection is passing an argument
- Mark Seemann - Partial application is dependency injection
- Mark Seemann - Dependency rejection
The Reader monad...
The Free monad...
99 Ways to DI
I originally gave this talk with the alternative title "99 Ways To DI", a reference to the Megadeth track "99 Ways To Die" (a favorite track of mine in my youth). I included several images of Megadeth lead singer/guitarist Dave Mustaine. I've removed these images in this version of the slides to allow me to distribute the content under a Creative Commons license.