News for hackers. Stuff that matters.
Re:TDD Doesn't Force Good Design by piva00 on Tuesday September 05, 2023 @10:06AM (#37391819)
You can do dependency injection without a DI framework/container, just declare the required dependencies for a class as required parameters in the constructor and build your own dependency tree manually when constructing the objects in `main()`-equivalent.

Using a DI container is not required to implement the DI pattern, it's just a tool that facilitates some more complex DI.

I tend to prefer to keep my projects simple enough that manual DI is quite appropriate and readable.

There are no comments on this comment yet.