← 返回刚才阅读的位置

知识卡片

问题卡 · 4927.d.2

公开词汇隔离内部命名

理解等级:中级

外部接口采用公开定义的词汇,并发布字段及定义来源;如givenName代替局部fname,可降低他人理解成本。内部历史命名可通过防腐层映射,不必因此修改存储。治理应明确优先词汇源、限制同义词,并在找不到合适词时统一发布新词;词汇还应摆脱具体SDK或平台依赖。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 超媒体接口设计 · 查看原书依据

      That private set of names is usually tied to age-old internal practices, possibly a single team’s design aesthetics, or even decisions dictated by commercial off-the-shelf (COTS) software purchased a long time ago. To solve this problem, services need to implement what is called an “anti-corruption layer”. There is no need to modify the existing data storage model or services.

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)》第03章《超媒体接口设计》(来源项目 book-sources;源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch03.xhtml;小节:3.3) - 结论依据:原文以外部接口采用公开定义的词汇,并发布字段及定义来源;如givenName代替局部fname,可降低他人理解成本的机制或场景为依据;同小节余文补充本卡所列条件,按2022年原书语境整理。 - 原始内容:That private set of names is usually tied to age-old internal practices, possibly a single team’s design aesthetics, or even decisions dictated by commercial off-the-shelf (COTS) software purchased a long time ago. To solve this problem, services need to implement what is called an “anti-corruption layer”. There is no need to modify the existing data storage model or services.