Slide 32
Slide 32 text
SO FAR...
Popular frameworks offer both Dependency Injection and Service Location
SL = simpler, but couples service to container
DI = Testable code, but time consuming to set up and configure
Method requirements should be visible from the method signature only
Constructor-only injection in your controllers shares objects that may not need to be shared
Note: we're not talking about setter injection here
Method injection in your controllers provides a clear explanation of the method's needs
Controllers don't always adhere to SRP anyway