← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3481.i

超媒体格式能力不同

理解等级:高级

超媒体格式对链接、表单和数据体的标准化程度不同。HAL主要规定链接,SIREN还规定动作表单,HTML、Collection+JSON与UBER覆盖的要素更多。选择格式时先确认客户端需要发现哪些信息;用HAL-FORMS或POD补齐缺口又会增加实现组合,不能把所有“支持超媒体”的格式视为可互换。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 附录C:标准的角色与能力差异 · 查看原书依据

      All hypermedia formats are not equal. For example, the Hypertext Application Language (HAL) format standardizes link elements but does not standardize forms or data bodies. The Structured Interface for Representing Entities (SIREN) format standardizes links and forms, but not data bodies. HTML, Collection+JSON, and Uniform Basis for Exchanging Representations (UBER) standardize all three message elements. I’ve created some “hypermedia polyfill” formats to supplement SIREN (Profile Object Description) and HAL (HAL-FORMS) to help bridge the gaps, but these additions can complicate implementations.

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook》Appendix C. Related Standards(来源项目book-sources,源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/app03.xhtml) - 结论依据:原文直接给出相应职责、操作或比较;本卡保留其用途与适用边界,不将历史接口表述当作当前工具验证。 - 原始内容:All hypermedia formats are not equal. For example, the Hypertext Application Language (HAL) format standardizes link elements but does not standardize forms or data bodies. The Structured Interface for Representing Entities (SIREN) format standardizes links and forms, but not data bodies. HTML, Collection+JSON, and Uniform Basis for Exchanging Representations (UBER) standardize all three message elements. I’ve created some “hypermedia polyfill” formats to supplement SIREN (Profile Object Description) and HAL (HAL-FORMS) to help bridge the gaps, but these additions can complicate implementations.