3 ms·
I see what you mean now, and I agree. I thought that you were hinting that DI can be done (esp. on a smaller scale) often manually without any complex containe
by The_Colonel 2y ago
I see what you mean now, and I agree.
I thought that you were hinting that DI can be done (esp. on a smaller scale) often manually without any complex container magic.
Like in a smaller app, construct all your service instances in the main method while passing the dependencies into constructors and voilà - you have a DI based application without a container / any framework.
- WatchDog 2y ago> I thought that you were hinting that DI can be done (esp. on a smaller scale) often manually without any complex container magic. I also agree with this, and at any scale. Actually I think the larger scale the codebase, the more it would benefit from manual DI, obviously at that point, the wiring code grows and you would probably break it down into multiple methods.