I’ve just read these slides about dependency injection smells: Slides for my ‘Dependency Injection Smells’ talk
These are notes to myself.
Dependency injection smells:
- static dependency
- missing dependency auto-recovery
- hidden dependencies
- creation logic reduction
- factory methods
- programming against an implementation
- dependencies prohibited
Keep in mind:
- be clear and open about your dependencies
- require only a minimum amount of dependencies
- develop with your users (other developers) in mind