3 ms·
Dependency injection as a concept is not tied to a framework. Just inject your dependencies into constructors. I occasionally do this even in languages with go
by gamegoblin 10y ago
Dependency injection as a concept is not tied to a framework. Just inject your dependencies into constructors.
I occasionally do this even in languages with good DI frameworks like Java when I don't want to pull in a Guice or Spring dependency. Even "manual" DI like this is so much better than not doing DI at all.