知识卡片

普通读书笔记卡 · 3494.a

端口定义技术无关接口

理解等级:中级

端口是业务核心与适配器之间的技术无关接口,表达业务需要的操作,而不暴露 HTTP、SQL 或存储引擎细节。适配器负责把外部协议或存储能力转换为端口所需的形式。这样才能兑现 [[六边形架构隔离核心]] 的可替换性。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Microservice APIs》第 7 章《Service implementation patterns for microservices》(源文件:_epub-src/OEBPS/Text/07.htm) - 结论依据:原文要求将核心逻辑与适配器逻辑严格分开,并直接定义端口是连接两者的技术无关接口。 - 原始内容:Hexagonal architecture requires that we keep the core logic of the service and the logic for the adapters strictly separated. ... Ports are technology-agnostic interfaces that connect the business layer with the adapters.