Where to put notification templates in Domain Driven Design?
I have a project with four layers: Domain Application Infrastructure Presentation I have an email service interface in the Application layer. It takes an interface parameter called INotificationTemplate, which has a method that returns a list of paragraphs for the body of the notification sent by the email service. The classes implementing INotificationTemplate are currently in the Application layer. Each class corresponds to a specific event, such as "Case Creation" or "Calendar Event Update." My main question is, should classes implementing INotificationTemplate be in the Domain layer instead?
![Where to put notification templates in Domain Driven Design?](https://cdn.sstatic.net/Sites/softwareengineering/Img/apple-touch-icon@2.png?v=1ef7363febba)
I have a project with four layers:
- Domain
- Application
- Infrastructure
- Presentation
I have an email service interface in the Application layer. It takes an interface parameter called INotificationTemplate
, which has a method that returns a list of paragraphs for the body of the notification sent by the email service.
The classes implementing INotificationTemplate
are currently in the Application layer. Each class corresponds to a specific event, such as "Case Creation" or "Calendar Event Update."
My main question is, should classes implementing INotificationTemplate
be in the Domain layer instead?