The architecture of DDD development mode based on congestion model is divided into four layers. The service layer in the original three-layer architecture is divided into service layer and domain layer, and the business logic in the service layer in the original three-layer architecture is transferred to domain layer
The Controller layer
- Interface exposed
- Simple parameter verification
3. Unified exception handling
The Service layer
- Connect domain and repository
- Cross domain polymerization
- Non-functional/tripartite interaction, etc
Domain layer
domain entity,value object,domain event,domain factory
- Model object initialization
- Concrete business logic implementation
- Value object data consistency
The Repository layer
- The DB interaction
- Gateway service
- Cache service
- Link to monitor
- .