知识卡片

普通读书笔记卡 · 1458.f.5.a.2.b

调用结果承接后续操作

理解等级:中级

API面向写代码的开发者,常用流程应易学、难误用且下一步明显。预配置客户端减少第一次调用的样板;查询结果应能直接用于后续操作,避免用户解析格式再重新组装。书店示例用搜索返回的书对象直接购买,表达的是信息连续性,代码属于示意片段,不应据其变量拼写当作可运行实现。

相关:[[信息交换减少用户负担]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 理解用户体验 · 查看原书依据

      If a client has to send information back in follow-up calls, we need to create an object to enclose the information and ask the client to send it back. For example, in the previous code snippet, when buying a book, we can pass in the book object we received from the search without understanding the format of the book object.

    参考来源

    - 位置:《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面向写代码的开发者,常用流程应易学、难误用且下一步明显”;正文据此说明用途和边界。 - 原始内容:If a client has to send information back in follow-up calls, we need to create an object to enclose the information and ask the client to send it back. For example, in the previous code snippet, when buying a book, we can pass in the book object we received from the search without understanding the format of the book object.