每周阅读(06/19/2017)

7 Rules for REST API URI Design

REST API设计的7个原则:
URI = scheme "://" authority "/" path [ "?" query ] [ "#" fragment ]

  1. A trailing forward slash (/) should not be included in URIs:URI最后的字母不应为斜杠
    http://api.canvas.com/shapes/
  2. Forward slash separator (/) must be used to indicate a hierarchical relationship:斜杠之间表明了层级关系
    http://api.canvas.com/shapes/polygons/quadrilaterals/squares
  3. Hyphens (-) should be used to improve the readability of URIs:可用横划线提高可读性
    http://api.example.com/blogs/guy-levin/posts/this-is-my-first-post
  4. Underscores (_) should not be used in URIs:不要使用下划线
  5. Lowercase letters should be preferred in URI paths:用小写
  6. File extensions should not be included in URIs:不要包含文件扩展名
    http://api.college.com/students/3248234/courses/2005/fall.json http://api.college.com/students/3248234/courses/2005/fall
  7. Should the endpoint name be singular or plural?:用复数
    http://api.college.com/students/3248234/courses

Amazon New Customer

Amazon Goal, Strategy, Tactic about AWS, Prime and Whole Foods.

At its core Amazon is a services provider enabled — and protected — by scale.

AWS

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容