|
|
|
|
|
by phillmv
4468 days ago
|
|
The solution you describe is isomorphic to the one proposed in the blog post, which I think you recognize? But both leave a lot to be desired. I personally think in both cases they are a code smell, and we ought to either introduce an object whose explicit job it is to worry about these inter domain interactions or pile it up as a mixin into the appropriate domain models. |
|
The function itself can be decomposed into smaller functions.
If you need extensibility, you could make the function composable and register additional pieces to the policy. Most codebases don't need this sort of extensibility.
Simple constructs & consistent, accurate, precise naming is preferable to complicated architectures.