3 ms·
The create vs. save is a typo, those could easily both be create and my point is identical. Regarding validation - depends on who you ask. Single Responsibilit
by ryanbrunner 10y ago
The create vs. save is a typo, those could easily both be create and my point is identical.
Regarding validation - depends on who you ask. Single Responsibility Principle taken to an extreme would probably support the idea of having a single class whose purpose is to validate an object.
Regardless of nitpicking though, the point is that dependency injection often makes it harder to reason about code (as large parts of the "business logic" of code are relegated to a dependency that isn't obvious to locate), and are often done strictly for the benefit of the tests, rather than the functionality or comprehensibility of the code.