Re: Many rules for reusability and testability
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
As you suggested, a domain service like ExternalRuleService will help. The most important aspect I was looking for was testing. In my case, if the business comes with a new business rule for sending eviction notice, me being a developer can add a rule, run the existing tests to make sure they pass and a new test to check the new rule passes. I think Scott Millet also follows this pattern in his architecture book. A visitor pattern may be good choice here. I can agree with you that if the app has a dependency on the business rules which are managed by the business through some UI, there are so many issues we have to deal with including the testing.