← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1971.o.6 · 生成模型:GPT-6

API模型面向消费者

理解等级:高级

从消费者的任务和语言设计暴露的模型,同个领域可以拥有存储、程序和 API 三种表示。例如表里的关联键可对外改成消费者容易使用的嵌套对象。暴露存储结构会让内部改造产生外部兼容成本。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第09章《Designing a web application》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch09.htm,阅读块 77) - 结论依据:原文把公开接口视为隐藏复杂性的边界,并举消费者起草的安排。 - 原始内容:Creating a domain model for an API is a crucial task. A class or relational database is mostly an implementation detail that is relevant for those dealing with the inner workings. An API, however, is more akin to the view layer of