Using umbraco 10 in a domain driven design architecture
Dears,
I am going to use umbraco 10 in a domain driven design solution.
So the solution will include the following projects
Application
Domain
Persistence
Infrastructure
Presentation
I am still thinking where should I locate generated models and services that will retrieve or add content.
Solution # 1
Create a domain model with the same properties as back-office but will generate models in persistence layer.
Create interfaces like repositories in application layer but implementations will be in persistence layer also
Pros:
Application and Domain layers will be fully independent "I mean will not depend on Umbraco"
Persistence layer will be the only layer that depend on Umbraco and i think this is meet the clean architecture
Cons:
Implementation will be more complex and needs lots of mapping operations to map between domain entities, DTOs and generated models
Solution # 2
Generate back-office models in domain layer
Create interfaces like repositories in application layer but implementations will be in persistence layer also
Pros:
Easy to implement
Cons:
Domain layer will depend on Umbraco and i think this is will violate clean architecture as domain layer shouldn't depend on any other layer, frameworks, libraries or a 3rd party.
So can u help me to decide which is the best solution or can you suggest a new solution?
Using umbraco 10 in a domain driven design architecture
Dears,
I am going to use umbraco 10 in a domain driven design solution. So the solution will include the following projects
I am still thinking where should I locate generated models and services that will retrieve or add content.
Solution # 1
Create a domain model with the same properties as back-office but will generate models in persistence layer. Create interfaces like repositories in application layer but implementations will be in persistence layer also
Application and Domain layers will be fully independent "I mean will not depend on Umbraco"
Persistence layer will be the only layer that depend on Umbraco and i think this is meet the clean architecture
Implementation will be more complex and needs lots of mapping operations to map between domain entities, DTOs and generated models
Solution # 2
Generate back-office models in domain layer Create interfaces like repositories in application layer but implementations will be in persistence layer also
Easy to implement
Domain layer will depend on Umbraco and i think this is will violate clean architecture as domain layer shouldn't depend on any other layer, frameworks, libraries or a 3rd party.
So can u help me to decide which is the best solution or can you suggest a new solution?
Thanks in advance...
is working on a reply...