RE: Beginner DDD Question: Enum
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Hi! The domain model layer encapsulates the domain logic (business rules, concepts from the ubiquitous language etc). It should be stripped down from technical responsibilities. Enums are a language construct, and I see no reason why you wouldn't use them in your domain model if they help achieving the domain model goal. In fact, I can't think of any constraint which will disallow the use of a particular language construct from a certain part of an architectural design, such as "no lambdas in your presentation layer" or "no extension methods in the service layer" etc. The way I see it, the two concepts are completely orthogonal. Does this make sense to you?