Quoting DDD theory:
The application layer is thin in terms of domain logic - it merely coordinates the domain layer objects to perform the actual work.
When it comes to modularization, and assuming that the module containing the domain entities and the interfaces of the domain services belongs to the domain layer, the application layer depends on the domain layer, which breaks the dependency inversion principle.
The implementation of the high-level component's interface by the low level component requires that the low-level component package depend upon the high-level component for compilation, thus inverting the conventional dependency relationship.
What am I missing?
I add an UML diagram to clarify the problem I see.
- The Persistence Layer depends upon an abstration in the Domain Layer -> DIP ok!
- The Application Layer depends upon an abstraction in the Domain Layer -> Does this break the DIP?