I'm working on a multi module maven based application based on the following modules:
- Model, contains all the Domain Entities
- Persistence, contains all the Repository (or DAO) used to access the models
- Service, contains all the business logic
- Web, contains all the controllers logic to expose rest API
The problem I'm trying to figure out is about the DTO mapping, right now the dependency are organized in a linear way:
Model <- Persistence <- Service <- Web
Where all the DTO logic should belong? Let's say we have a method inside the service layer called
createRoom(CreateRoomDTO createRoomDTO)
in this case the CreateRoomDTO class is highly coupled with the service and web modules, but not all the DTO classes are used by the service layer (for example a PaginationFilter)
Aucun commentaire:
Enregistrer un commentaire