← 返回刚才阅读的位置

知识卡片

问题卡 · 4927.a.1.b

注册媒体类型促互通

理解等级:中级

长期互操作先选择并公开稳定媒体类型,使客户端能绑定消息规则。服务宜支持不止一种格式,让客户端发现和选择;优先考虑可嵌入超媒体并支持安全扩展的类型。自建格式还承担注册、文档、示例工具与长期社区支持成本,不能只按当前实现方便选择。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 超媒体接口设计 · 查看原书依据

      Additional recommendations for candidate media types are: 1) they should support hypermedia within the message (see Recipe 3.5) and 2) they should support custom extensions (e.g., your ability to safely add new features to the format without breaking any existing applications). This last point will come in handy when you are stuck supporting a format that has fallen out of favor and you need to make some modifications to extend the life of your service.

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)》第03章《超媒体接口设计》(来源项目 book-sources;源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch03.xhtml;小节:3.1) - 结论依据:原文以长期互操作先选择并公开稳定媒体类型,使客户端能绑定消息规则的机制或场景为依据;同小节余文补充本卡所列条件,按2022年原书语境整理。 - 原始内容:Additional recommendations for candidate media types are: 1) they should support hypermedia within the message (see Recipe 3.5) and 2) they should support custom extensions (e.g., your ability to safely add new features to the format without breaking any existing applications). This last point will come in handy when you are stuck supporting a format that has fallen out of favor and you need to make some modifications to extend the life of your service.