How to differentiate a concept is domain logic or application logic ?
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Domain layer encapsulates the domain logic . Application layer encapsulates application logic . My question is that how to differentiate a concept is the domain logic or application logic ? From what I read ,if a concept is communicated by domain experts/users in their jobs , then that concept should be modeled and located in the domain layer . So I have the following questions : (1) I don't think the domain expert will care about how to persist the state of a domain entity , so why repository is located in the domain layer? (2) Most domain expert only care about how the application can help them to do their daily jobs . They care and talk about different use cases and their flow to do that use cases in their daily job . So why the use cases and their flow is encapsulated in the application service which is in the application layer?