Dependency injection and IOC containers in a closed project
- by Puckl
Does it make sense to assemble my project with dependency injection containers if I am the only one who will use the code of that project?
The question came up when I read this IOC Article http://martinfowler.com/articles/injection.html
The justification for using dependency injection in this article is that friends can reuse a class, and replace depending classes with their own classes because they get injected and not instantiated in the class.
I would only use it to inject objects where they are needed instead of passing them through layers to their target. (Which is not so bad I learned here: Is it bad practice to pass instances through several layers?)
(Maybe I will reuse parts of the project, who knows, but I don´t know if that is a good justification)