DEV Community

Discussion on: Explain Dependency Injection Container like I'm five

Collapse
chandlerbing016 profile image
Sumit Wadhwa Author

I'm sorry for my inadequacy. But, what do you mean when you say lots of different versions of MyDependency? Are you referring to polymorphism?

Collapse
17cupsofcoffee profile image
Joe Clay

Yep, polymorphism is what I was referring to, apologies if that wasn't clear! In the second example, MyDependency could be an class with multiple sub-classes or an interface with multiple implementors.

Thread Thread
chandlerbing016 profile image
Sumit Wadhwa Author

Thanks so much for making it clear.