This video gives perfect clarity on Dependency injection. I did read on stackoverflow that it meant just declaring objects of a class. That did seem simple but it did not really make sense. This video connected all the dots. Thank you for this sir.
Watched many videos to understand Dependency Injection but none of those gave clarity. This video gave me crystal clear understanding about dependency injection. Thanks for the video :)
I'm wondering if a DIContainer is just a singleton that provides the implementation to other scripts instead of having to have multiple singleton scripts and having to reference its multiple dependencies inside a script. Scripts just have one dependency, that of the DIContainer, which holds all the global dependencies. Did I get it correctly?
Thanks a lot dear for this valuable explanaiton as usual. I already bought most of your Udemy courses. You are a great teacher. As per your example, in case you have a new class, also, you will create an interface to it to register it, so, the place you want to consume it, you have to change the interface injection to the new interface, please correct me if I'm wrong. Also, I have inheritance "Abstract Class" with some common implementation for subclasses, using DI with inheritance is impossible, because they are different concepts. I tried it a lot, I didn't succeed. Appreciate if you correct me if I'm wrong. Thanks