Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
REST APIs must be hypertext-driven (gbiv.com)
10 points by tlrobinson on Aug 22, 2011 | hide | past | favorite | 1 comment


The main problems with an API driven by hypertext are efficiency and writing simple code. Let's say you are writing an API to save some data to a server. Which would you rather a developer do:

(a) Send a request to the base URL, parse it to figure out a resource URL, and then send a request to the resource URL

(b) Construct the resource URL in their code directly and send a request there

Method (a) is what the original REST research paper advocated. But it isn't a good idea. It's less efficient, because it requires an extra network call. And it requires more code from the developer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: