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
  1. Interface exposed
  2. Simple parameter verification

3. Unified exception handling

The Service layer
  1. Connect domain and repository
  2. Cross domain polymerization
  3. Non-functional/tripartite interaction, etc
Domain layer

domain entity,value object,domain event,domain factory

  1. Model object initialization
  2. Concrete business logic implementation
  3. Value object data consistency
The Repository layer
  1. The DB interaction
  2. Gateway service
  3. Cache service
  4. Link to monitor
  5. .