November 2018
Intermediate to advanced
346 pages
8h 12m
English
1. What form of dependency injection-induced damage do you see most often?
For me, this is absolutely excessive parameters. After learning dependency injection and getting excited about it, it's easy to want to abstract and inject everything. It tends to make testing a lot easier as the responsibility of each object decreases. The downside is a lot of objects and too much injection.
If I find myself with too many dependencies, I will try to step back and check my object design, looking for single responsibility principle issues in particular.
2. Why is it important not to blindly apply dependency injection all the time?
Just because something is cool or new, doesn't mean it's the best tool for the job. ...
Read now
Unlock full access