Dependency Injection
- in pure Java
- with frameworks like Guice or Spring
- in pure Scala
- the Cake Pattern
- a solution based on closures and some other more classic Scala features
- mixing the test
- injecting
- structural typing
how to allow the wiring:
- setters VS immutability
- constructor / factory / case class
- closures
- annotations
- automatic wiring
- strategies: wiring by name, by type, interface/implementation, etc.
framework or language features
static typing and type safe
dependency to the context and how it is injected
framework limitations in Scala
- type injection
- not type safe
- XML
- not initialized values (NullPointerException)