At present we have 2 PHP applications which share absolutely no code, but share a common database. One app is the timesheet application for administrators, the other is the timesheet applications employees log their time against projects. We are proposing a complete rebuild of the application using Spring Boot, Spring Data Jpa, Hibernate, Java8. We want to keep the applications separate as business may want to deploy and make changes to them independently, and they also present and take different data so it doesn't make sense for them to share the same models and API anyway.
The applications doesn't have a lot of complex business rules yet, the system is half data entry, and half reporting. However over time there is more functionality that is being handled manually that we want to being into the system. As such I would like to borrow some of the ideas of DDD and CQRS into the design.
My proposal is a multi module Maven solution
-- Timesheet (parent module) -- timesheet-core -- domain services -- repositories -- domain models / jpa entities -- other common logic and classes -- timesheet-web-admin -- controllers / rest endpoints -- services (will query from here for read operations, writes go through repositories) -- DTOs (used to move data between client and other layers) -- timesheet-employee-admin -- controllers / rest endpoints -- services (will query from here for read operations, writes go through repositories) -- DTOs (used to move data between client and other layers) I'm not one who believes in strictly following patterns like a doctrine / religion. I think DDD and CQRS ideas and patterns might be beneficial though. We have roughly 100 - 120 people using this system so I'm not sure if event sourcing and having separate databases is really necessary.
Does this design / architecture at least make sense from a high level or am I making a terrible mistake trying to bring DDD into the fold? My idea is JPA / Repositories will handle all write operations, but the appliation services will handle reads and returning the data in DTO objects.
