← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2849.g

统一模式名促进复用

理解等级:高级

不同团队可能已经实现了相似的分页、恢复等做法,却没有共同名称。给这些共享设计建立一致术语,可以让讨论与复用从“各说各的代码”转为“同一个问题与配方”。命名改善沟通,不会自动保证实现语义一致,仍要核对条件和行为。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 结语:按收益渐进采用配方 · 查看原书依据

      It is worth pointing out that one of the advantages of using these recipes is they give us common names to use for shared things. The recipes are a language that we can use to talk about our designs. In my experience, even before I introduce these recipes to a client, I see examples of them in some of their service interfaces. Usually, while the teams know about a common way to handle paging through lists, for example, they haven’t really shared that as a reuseable recipe and don’t have a common name for it throughout the company. Sometimes just using the names of these recipes can bring additional coherence to your API implementations.

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook》Chapter 8. Closing Remarks(来源项目book-sources,源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch08.xhtml) - 结论依据:原文直接给出相应职责、操作或比较;本卡保留其用途与适用边界,不将历史接口表述当作当前工具验证。 - 原始内容:It is worth pointing out that one of the advantages of using these recipes is they give us common names to use for shared things. The recipes are a language that we can use to talk about our designs. In my experience, even before I introduce these recipes to a client, I see examples of them in some of their service interfaces. Usually, while the teams know about a common way to handle paging through lists, for example, they haven’t really shared that as a reuseable recipe and don’t have a common name for it throughout the company. Sometimes just using the names of these recipes can bring additional coherence to your API implementations.