Live data from Hacker News

How did REST come to mean the opposite of REST?

htmx.org

181–190 of 393 posts

Re: How did REST come to mean the opposite of REST?

#181
post #76

Earlier quoted context omitted.

That's usually a sign that the thing that didn't get a new word is not actually all that useful or interesting.

Highly debatable. A (too quick?) Darwinist perspective would tell us that the original ReST was not fit. And the "new" ReST (aka, JSON-RPC) is more fit. Fit in its current ecosystem, of course.

That's exactly what I meant. The "new REST" appropriated the term because it's what's actually being used. The "old REST" didn't get a new term because it's not actually being used.

There are still theoretical discussions around "old REST", but they all have "new REST isn't REST at all" as their core point, so the lack of new terminology is deliberate there.

Re: How did REST come to mean the opposite of REST?

#182
post #20
post #7

The client knows nothing about the API end points associated with this data, except via URLs and hypermedia controls (links and forms) discoverable within the HTML itself. If the state of the resource changes such that the allowable actions available on that resource change (for example, if the account goes into overdraft) then the HTML response would change to show the new set of actions available. If the client kno…

> "This would suggest a restful api is not made for system-to-system communication, but requires human mediation at every step of the way" Which is exactly what REST was originally designed to do: provide an architecture for the Internet (not your app or service) that allows for humans using software clients to interact with services developed by programmers other than those which developed the clients. It was about…

In thay case RESTful API is an oxymoron, because if it is REST it isn't an API.

Re: How did REST come to mean the opposite of REST?

#184
post #175
post #70

Earlier quoted context omitted.

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 t…

> 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 desc…

Well 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

Re: How did REST come to mean the opposite of REST?

#185
post #20
post #7

The client knows nothing about the API end points associated with this data, except via URLs and hypermedia controls (links and forms) discoverable within the HTML itself. If the state of the resource changes such that the allowable actions available on that resource change (for example, if the account goes into overdraft) then the HTML response would change to show the new set of actions available. If the client kno…

> "This would suggest a restful api is not made for system-to-system communication, but requires human mediation at every step of the way" Which is exactly what REST was originally designed to do: provide an architecture for the Internet (not your app or service) that allows for humans using software clients to interact with services developed by programmers other than those which developed the clients. It was about…

Sounds very similar to (as far as I understand it) GOPHER.

Re: How did REST come to mean the opposite of REST?

#186
post #9

I feel old for I have witnessed many of these battles. But I feel that I have seen history. There's nothing wrong in this article, in the sense that everything's correct and right. But it is an old person's battle (figuratively, no offense to the author intended, I'm that old person sometimes). It would be like your grandparents correcting today's authors on their grammar. You may be right historically and normativel…

The descriptivist approach has a lot of merits when it comes to language -- to no small extent, words do mean what people think they mean; this is part of what it means for words to have any meaning at all, and when entire cultures let the meaning of a word drift it's hard to figure out what ground to stand on in order to say they're wrong . And yet... right or wrong, something substantial is lost when "literally" fa…

On the other hand, there's nothing fundamental about html that is encoded in the REST acronym itself. Is an http JSON API representational? Yes. Does it transfer state? Yes. If anything the cruel bit is that we use JSON over HTTP, which is "supposed to be" for hypertext.

Re: How did REST come to mean the opposite of REST?

#187

Earlier quoted context omitted.

I am the author and I agree with most of what you are saying here, REST and HATEOAS are for humans: https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.h... I disagree that it isn't an API, but that's a definition quibble. It is probably more profitable to talk about RESTful systems rather than RESTful APIs, since people think API == machines talking.

> I disagree that it isn't an API, but that's a definition quibble. I don't understand: An API is an application programming interface, i.e. it is meant to be consumed by other programs. How does that go together with > REST and HATEOAS are for humans ? And how does that go together with the requirements of "no interpretation needed" and therefore "little coupling" between client and server that were mentioned in the…

An API is also the interface used by humans to create programs. When you use a library, you're using its API. This sense of the term API is often lost.

Re: How did REST come to mean the opposite of REST?

#190
I remember wasting a huge amount of time on this debate over a decade ago. Frankly, I think the issue is that HATEOAS is not useful enough. It's a really nice idea, but in practice nobody actually wants to write an API client that way. So they don't. So API creators don't optimize for it. I consider all of RPC, GraphQL, and bastardized-REST systems to be less elegant but more pragmatic than "true REST". I can still palpably feel how refreshing it was when I finally went to work somewhere that didn't bother with this whole debate and just focused on building good RPC interfaces. More people should embrace that.
Post reply on HN