知识卡片
API模型面向消费者
从消费者的任务和语言设计暴露的模型,同个领域可以拥有存储、程序和 API 三种表示。例如表里的关联键可对外改成消费者容易使用的嵌套对象。暴露存储结构会让内部改造产生外部兼容成本。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Designing a web application 9.3 Domain modeling and APIs · 查看原书依据
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
参考来源
- 位置:《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