---
id: hex
requestedLanguage: zh
descriptionLanguage: zh
---

# 六边形架构 · Hexagonal Architecture / Ports and Adapters

- 类型: 架构模式
- 分组: 设计
- 位置: 设计 / 模型与边界
- [来源](<https://alistair.cockburn.us/hexagonal-architecture>)

[HTML](https://dpm.cnonim.name/zh/practices/hex/)

通过端口和适配器，将应用逻辑与外部技术分离。

## 关系

- 可通过其验证: [架构适应度函数 · Architecture Fitness Functions](/practices/fitness/zh.md) (verification)
- 可与之结合: [函数式核心 · Functional Core, Imperative Shell](/practices/core/zh.md) (combination)
- 帮助为其识别接口: [API 优先 · API-first design](/practices/api/zh.md) (support)

[在地图上显示](https://dpm.cnonim.name/#practice=hex&lang=zh)
