I just usually do applications for myself as a hobby. It looks like DI frameworks have a big momentum in the community, so I thought maybe I should learn it to improve my coding skills. From what I understand, it seems to be geared more towards big projects. Is it still a good idea to use it for example in a 5k lines project?
Share
I use DI for all code I write, no matter the size.
However, you should be aware that DI does not require a DI Container. A DI Container certainly helps (especially on big projects), but you can also write container-agnostic code using DI principles.
The size of the code base doesn’t really matter. What matters is maintainability. DI enables loose coupling that again enables maintainability. For all but one-off, throw-away projects, that’s valuable.