Re: Guidelines to decide when a domain role needs to be explicitly modelled
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Yes I guess such a use case would also warrant having a separate Domain Role class. Can i generalise it further and say that when an the business action can be performed only be specific instances of a domain role, in such cases it makes sense to begin modelling domain roles. In the example I gave above all doctors where not the same, so even though we could also model a DOCTOR_SECURITY_PERMISSION and have it checked at the application layer, we will also have to model a Doctor class to check whether the experience and qualifications allow the doctor to perform the surgery. Please let me know if that makes sense