3 ms·
Well, similarly, you might not need that singleton instance if you just import it where needed. Maybe then it's enough to just pass the data from the singleton
by knuthsat 5y ago
Well, similarly, you might not need that singleton instance if you just import it where needed. Maybe then it's enough to just pass the data from the singleton instance to all the things that need the data.
I think dependency injection is mostly a tool to allow multiple people to work on a single codebase. Rarely would you need it when you're doing stuff alone.
- yasserf 5y agoI mentioned in other comments, but the idea behind dependency injection is mostly to be able to support multiple different platforms (AWS / AZURE / Local) without having to do anything special. Might actually write a mini blog about it to see what people think.