知识卡片
统一模式名促进复用
不同团队可能已经实现了相似的分页、恢复等做法,却没有共同名称。给这些共享设计建立一致术语,可以让讨论与复用从“各说各的代码”转为“同一个问题与配方”。命名改善沟通,不会自动保证实现语义一致,仍要核对条件和行为。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 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.