HKGalden科技臺
發表文章發起投票
Consumer-Centric API Design
https://github.com/tlhunter/consumer-centric-api-design

一本介紹設計HTTP-based APIs嘅e-book。

我覺得reddit上有個Comment講得唔錯:


While working with non-Hypermedia RESTful APIs, the URL Endpoints are part of the contract between the API and the Consumer. These Endpoints must be known by the Consumer ahead of time, and changing them means the Consumer is no longer able to communicate with the API.


This is not REST, this is the opposite of REST. There's no such thing as a "non-hypermedia RESTful API". That's like saying "non-wet water". REST APIs are intrinsically hypermedia-based. Here it is from the horse's mouth. From Fielding's article:

if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed?



http://www.reddit.com/r/programming/comments/2d8w1o/creative_commons_book_on_api_design/cjnqddb
Good0Bad0
2014/08/15, 1:39:41 凌晨
本貼文共有 0 個回覆
此貼文已鎖,將不接受回覆
發表文章發起投票