← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 4545.g.8.d.4.b

端口把核心与技术细节分开

理解等级:中级

六边形架构把业务核心放在端口之后,由适配器翻译外部协议或存储方式。核心依赖它需要的契约,而非REST、gRPC或具体数据库实现;外围组件依赖核心定义的接口。六边形只是示意布局,不要求恰有六个端口,也不表示核心不再需要同步与持久化语义。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Loose Coupling · 查看原书依据

      Hexagonal architecture — also known as the “ports and adapters” pattern — is an architectural pattern that uses loose coupling and inversion of control as its central design philosophy to establish clear boundaries between business and peripheral logic. In a hexagonal application, the core application doesn’t know any details at all about the outside world,

    参考来源

    - 位置:《Cloud Native Go》第08章《Loose Coupling》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch08.xhtml) - 结论依据:六边形架构把业务核心放在端口之后,由适配器翻译外部协议或存储方式。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。 - 原始内容:Hexagonal architecture — also known as the “ports and adapters” pattern — is an architectural pattern that uses loose coupling and inversion of control as its central design philosophy to establish clear boundaries between business and peripheral logic. In a hexagonal application, the core application doesn’t know any details at all about the outside world,