Explaining the software architecture
For our application, we have combined Domain-Driven Design (DDD) and MVC so our legacy application has layers or tiers.
As we followed these approaches, we have the following categories of classes:
- Controller: Processes the requests from the browser, invokes the appropriate service, and passes the result to the appropriate view (Thymeleaf template).
- Bean: Encapsulates the information sent to and received from a web page. This is also known as the ViewModel.
- Service (domain service): Orchestrates the transaction by obtaining an aggregate from the repository, invoking the appropriate business logic on the aggregate and updating the repository.
- Repository: The abstraction of the relational database that handles Object Relational Mapping (ORM). Thanks to Spring Data JPA, this is an interface and Spring Boot provides the implementation.
- Aggregate: An object that is a group of domain objects that can be treated as a single...