4 ms·
By my read of this "REST API" is a near oxymoron. It was never supposed to be an "API" in the sense that a program consumes it. It was originally described as "
by mattarm 4y ago
By my read of this "REST API" is a near oxymoron. It was never supposed to be an "API" in the sense that a program consumes it. It was originally described as "Representational State Transfer (REST) architectural style for distributed hypermedia systems" with a focus on describing resources in generic ways for consumption by hypermedia systems (not arbitrary programs!).
I think this is most clearly described by two things Fielding wrote (and the original article links to):
https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arc...
https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypert...
- cpill 4y ago> describing resources in generic ways the trouble is that HTML is anything but generic. If you've ever tried to write a web scraper that can be used on _any_ webapage you quickly discover that its near impossible. I use to belived that there should be one way to use HTML to describe the page content and the rest should be CSS but gave up as its completely inflexable and the approch has been abandoned for simply describing presentation as this is actually practical. You'd need a HTML structural standard, but that will get mostly ignore (as have most of the W3Cs recommendations on that subject). As you said "REST" and "RESTful API" are different beast, i guess the "-ful" should be more of an "-ish".
- ReactiveJelly 4y agoWell pound for pound most websites want to sell ads to human eyes and categorically block any robot that doesn't have a human piloting it. Your best bet at finding standardized public data is projects that _want_ to be read and stored and don't make money, like Wikipedia
- jonhohle 4y agoThat was the idea behind micro formats and semantic HTML. The only people who ever used it thought the same as you, but there were never enough for any critical mass.
- zerocrates 4y agoSimilarly a client that just "does" HATEOAS and could be usefully used on any API is pretty much unattainable. At best you're going to be operating like a crawler. Knowing what to actually do and what's useful and what the resources and their components actually mean, that's all out-of-band, much like knowing the structure of a site you want to scrape.