知识卡片

普通读书笔记卡 · 1969.g.1

应用层复用操作编排

理解等级:中级

应用层以用例操作作为门面,负责事务、加载、调用业务对象和错误响应等编排,使GUI与API可复用同一流程。它是逻辑边界,不必独立部署。活动记录等需要外部编排时很有用;若事务脚本已承担这些职责,再加一层只重复转发接口,就没有封装价值。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 架构模式 · 查看原书依据

      The service layer acts as a façade for the business logic layer: it exposes an interface that corresponds with the public interface’s methods, encapsulating the required orchestration of the underlying layers. For example: interface CampaignManagementService { OperationResult CreateCampaign(CampaignDetails details); OperationResult Publish(CampaignId id, PublishingSchedule schedule); OperationResult Deactivate(CampaignId id); OperationResult AddDisplayLocation(CampaignId id, DisplayLocation newLocation); ... } All

    参考来源

    - 位置:《Learning Domain-Driven Design》第8章《架构模式》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch08.html) - 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。 - 原始内容:The service layer acts as a façade for the business logic layer: it exposes an interface that corresponds with the public interface’s methods, encapsulating the required orchestration of the underlying layers. For example: interface CampaignManagementService { OperationResult CreateCampaign(CampaignDetails details); OperationResult Publish(CampaignId id, PublishingSchedule schedule); OperationResult Deactivate(CampaignId id); OperationResult AddDisplayLocation(CampaignId id, DisplayLocation newLocation); ... } All