Remix.run Logo
How Did REST Come to Mean the Opposite of REST?(htmx.org)
15 points by vladde 20 hours ago | 12 comments
perrygeo 14 hours ago | parent | next [-]

Before REST gained mind share, developing for the web was effectively templating. Vanilla PHP, Java server pages, Django, Rails, etc all had this idea that business logic would be transformed server-side into complete web pages by injecting variables into HTML.

REST came along and tried to put some discipline around this. The URLs now mattered and had semantic meaning! All the self-describing hypertext stuff was interesting but largely ignored.

That one point - giving URLs noun-like semantics - led to the realization that the return mimetype could be anything. We could treat the website like a database and fetch raw information from it.

The only thing REST and JSON HTTP Apis have in common is that they agree URLs should have semantics. REST sorta opened peoples eyes to that fact... and the term was incorrectly adopted to describe everything that came after.

RaftPeople 11 hours ago | parent | next [-]

In addition to what you said, the idea that the endpoint should determine state and drive the possible sequence of actions is not obviously universally a good thing.

Many projects involve stringing together capability from different systems (via their api's) and creating essentially a new business layer on top of the combination of those systems. Now the abstract high level state is really managed by the new system and the component systems are just providing foundational capabilities.

The idea of HATEOS seems interesting but with limited application.

jdw64 13 hours ago | parent | prev [-]

[dead]

pornel 17 hours ago | parent | prev | next [-]

The terminology confusion was too difficult to resolve.

"REST" became associated with a good API design, so when people were told their API isn't a real REST, they interpreted it as having to implement more of Roy Fielding's vision to make it a really good API.

"Real REST must be self-describing hypermedia!" sounded like "you have to add more hyperlinks and delete your API docs", which of course didn't make any sense when you already had a thick RPC client (and RPC may have been the right architecture for the API).

"RESTful" was too similar to be a term for the opposite of the original REST, so it was too easy to interpret the issue as a technical criticism of "RESTful" being weak and falling short of fully-featured ideal "REST" rather than a terminology problem of the same term used for two valid but opposite architectural approaches.

The other term used at that time was AJAX ("async JS and XML"), which made even less sense for the "sync PHP and JSON" APIs (Node.js didn't exist yet).

JoeBOFH 19 hours ago | parent | prev | next [-]

To me this is gif vs gif. The populous has shifted in a direction the originator didn’t intend, but it’s the populous that use it.

RESTful to me is HTTP calls with PUT/PATCH/GET/DELETE and whatever else I am missing. The return doesn’t need to be json but needs to be structured so XML, JSON, etc

commandlinefan 17 hours ago | parent | next [-]

Part of the nomenclature problem here is that there's no other way to refer to an HTTP-based API. REST was originally an alternative to the horrible SOAP. I'd be fine with calling it something else (because the author is right, nobody's following Fielding's vision), but there's nothing else to call it.

icedchai 12 hours ago | parent | next [-]

"JSON-over-HTTP(S)" is a bit verbose, but accurate.

solarkraft 13 hours ago | parent | prev | next [-]

HTTP API?

kelseyfrog 15 hours ago | parent | prev [-]

The author suggests RESTless.

krystalgamer 18 hours ago | parent | prev [-]

this is explained in the article... referred to as Level 2 of Richard Maturity Model.

"Everyone stopped at Level 2 of the RMM"

commandlinefan 17 hours ago | parent | prev | next [-]

Agile definitely means the opposite of agile.

jdw64 13 hours ago | parent | prev [-]

[dead]