草叶睡蜢

导航

3.3 Execution Flow of a DDD Based Application 基于DDD的应用程序执行流程

3.3 Execution Flow of a DDD Based Application 基于DDD的应用程序执行流程

The figure below shows a typical request flow for a web application that has been developed based on DDD patterns.
一个基于DDD模式开发的Web应用的典型请求交互流程,如下图所示:
image

  • The request typically begins with a user interaction on the UI (a use case) that causes an HTTP request to the server.
  • 请求通常从用户在用户界面上的交互开始(一个用例),触发向服务器发送HTTP请求。
  • An MVC Controller or a Razor Page Handler in the Presentation Layer (or in the Distributed Services Layer) handles the request and can perform some cross cutting concerns in this stage (Authorization, Validation,Exception Handling, etc.). A Controller/Page injects the related Application Service interface and calls its method(s) by sending and receiving DTOs.
  • 在表现层(或分布式服务层)的MVC控制器或Razor页面的处理程序处理请求,并可以在这个阶段执行一些跨领域的焦点问题(授权验证异常处理等)。一个控制器/页面注入相关的应用服务接口,并通过发送和接收DTO对象调用其方法。
  • The Application Service uses the Domain Objects (Entities, Repository interfaces, Domain Services, etc.) to implement the use case. Application Layer implements some cross cutting concerns (Authorization, Validation,etc.). An Application Service method should be a Unit Of Work. That means it should be atomic.
  • 应用服务使用领域对象(实体、存储库接口、领域服务等)来实现用例。应用层实现了一些跨领域的焦点问题(授权验证等)。一个应用服务方法应该是一个工作单元。这意味着它应该是原子性的。
    Most of the cross cutting concerns are automatically and conventionally implemented by the ABP Framework and you typically don't need to write code for them.
    大多数跨领域的焦点问题都由ABP框架自动实现,你通常不需要为它们编写代码。

posted on 2021-10-19 12:02  草叶睡蜢  阅读(91)  评论(0编辑  收藏  举报