News for hackers. Stuff that matters.
Re:CUPID – the back story by jdlshore on Sunday March 21, 2021 @01:00PM (#26531861)
You can separate your code into “logic” which has no external dependencies (just logic, eg a domain model) and “infrastructure” which does. Infrastructure still requires DI but Logic doesn’t.

Some programs are nothing but Infrastructure (DB backed microservices) but some have complex Logic (complex problem domains). In the latter case the most important parts of the system can be tested without DI.

You still need DI but not pervasively.

There are no comments on this comment yet.