---
id: core
requestedLanguage: zh
descriptionLanguage: zh
---

# 函数式核心 · Functional Core, Imperative Shell

- 类型: 架构方法
- 分组: 设计
- 位置: 设计 / 模型与边界
- [来源](<https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell>)

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

将纯计算放在核心中，将输入、输出和副作用留在外壳中。

## 关系

- 可与之结合: [六边形架构 · Hexagonal Architecture / Ports and Adapters](/practices/hex/zh.md) (combination)
- 有助于: [单元测试 · Unit Testing](/practices/unit/zh.md) (support)

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