Is Okay to Extend the Domain Services by Application Services while implementing DDD
Hi friends,
I'm implementing a project using various advanced concepts, one of these concepts is
I have these layers
In the
In the
In the
Example:
Domain Service:
Application Service:
Additional info:
In the
Question:
I'm confusing about letting the implementation as I showed you, or do a better approach.
I asked
Please share with me your experience about this topic.
Massive thanks in advance <3
I'm implementing a project using various advanced concepts, one of these concepts is
DDD (Domain Driven Design).I have these layers
Domain, Infrastructure and Application layers.In the
Domain layer I have some Domain Services, In the
Infrastructure as everyone knows I implemented the RepositoriesIn the
Application layer I have Application Services, but here the confusing point for me, beacuse I let the Application Services to extend the Domain Services ( by the inheritance ).Example:
Domain Service:
Application Service:
Additional info:
In the
Application layer I have imlemented the CQRS ( Commands and Queries )Question:
I'm confusing about letting the implementation as I showed you, or do a better approach.
I asked
Github Copilot and it told me that the Application layer should not directly depend on Repositories instead it should depend on Domain Services and the Domain Services should depend on Repositories.Please share with me your experience about this topic.
Massive thanks in advance <3
