知识卡片
接口早设计晚公开
API一旦被外部系统采用,修改就受客户代码牵制。应尽早思考接口、先内部使用发现问题,但等必要时才公开。公共API还可能泄露竞争性数据,需单独评估;“已经实现”不是必须开放的理由,内部接口也不等于可以不设计。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 理解用户体验 · 查看原书依据
We should start designing APIs early. Once an API is released and others have been built on top of it, changing it is tough. Although you might design and even build code for APIs, expose them to the users only when it is necessary. If possible, we should use the APIs internally before making them public because that enables us to find and fix problems.
参考来源
- 位置:《Software Architecture and Decision-Making》第4章《理解用户体验》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch04.xhtml)
- 结论依据:原文的定义、比较或例子支持“API一旦被外部系统采用,修改就受客户代码牵制”;正文据此说明用途和边界。
- 原始内容:We should start designing APIs early. Once an API is released and others have been built on top of it, changing it is tough. Although you might design and even build code for APIs, expose them to the users only when it is necessary. If possible, we should use the APIs internally before making them public because that enables us to find and fix problems.