Application Services and Framework Annotations
Nikolaos Papagrigoriou <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody, In many of the sample DDD applications that I reviewed, framework specific annotations are used to annotate the Domain Model (e.g. @Table, @Entity) and the Application Services (e.g. @Transactional, @PreAuthorize). I believe that the Application Services and especially the Domain Model should not depend on the framework we are using. Do you agree with the statement above? For example, in the Domain Model we define Repository interfaces that are implemented in an infrastructure layer. Thus, the Domain Model is ignorant of the persistence mechanism. Similarly, Application Services manage security and transactions but depend on Security/Transaction interfaces defined in the Application layer. Greetings, Nikolaos Papagrigoriou * English - detected * English * Greek * German * English * Greek * German <javascript:void(0);>