Hacker News new | past | comments | ask | show | jobs | submit login

>For one, one of the hallmarks of DI is that you should have a single, central location where all your dependencies are assembled

While this is true, if you're doing your composition root right in a large application, then you're assembling most of your dependency graph using conventions, and assembling only the most unique things by hand.




While it may be a hallmark of DI it’s not necessary. Spring is perhaps the most famous DI framework of them all and is frequently used by “classpath scanning” relevant components to wire in




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: