DEV Community

Discussion on: Explain dependency injection like I'm five

Collapse
 
orask profile image
Oras Al-Kubaisi

Traditional: You get happy to see the pink ice cream van because you know you'll buy ice cream.

DI: The pink van is not here today but you still happy as there is another blue van that sells ice cream.

No matter which van you see, you'll still happy to get what you're after... ice cream.