I'm writing a mid-sized analysis program (5-10kloc) in MATLAB (not my decision), and I'm trying to use dependency injection to make my code more testable. I think I understand the basic object/constructor injection model, but I'm confused as to how this scales up the dependency graph.
For instance, if I have object A, which has-a object B, which has-a object C, and object C has a dependency that needs to be injected, do I need to pass it through the entire chain? Eventually, since this is a data analysis program, everything basically comes back to one AnalyzeData object/method, does this mean that that object has to have all the dependencies of the entire program injected?
Perhaps the answer is simply to use a ServiceFactory/ServiceProvider in this case, but I'd like to know if it's possible to scale many dependencies up to a large object graph without a framework.
Also, corrections on my thinking/wording/fundamentals are encouraged - I've basically been learning most of this through Google/HN/SO.