Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Half of the points are complete bs. URLs don’t matter in REST. What matters are link relations.


I would go even further and say that REST is BS Most people understand REST as a format for URLs and a particular semantics for HTTP methods. While it can be perfectly ok to design an api like person?id=123. This is the way that Postgrest does it, which works, and makes certain things like entities with composite primary keys way easier.

Other, like OP, think REST isn't going far enough in that HATEOAS is what "really" makes something restfull. This doesn't really work in practice as if changing the schema of some JSON response can magically change the behaviour of an application. I you want to lift all the logic to the server, I guess you can use htmx, but then you are not building an api anymore but a remote rendering engine.


You are still building an API, it's just a hypermedia API:

https://htmx.org/essays/hypermedia-apis-vs-data-apis/

REST was coined to describe the web. It has been misapplied to JSON APIs over HTTP, and the way we got here is a funny story:

https://htmx.org/essays/how-did-rest-come-to-mean-the-opposi...

other related essays:

https://htmx.org/essays/hypermedia-clients/

https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.h...

https://intercoolerjs.org/2016/01/18/rescuing-rest.html


Care to elaborate briefly on why they do?


"REST" is supposed to be an architectural style reflecting the Web as used by humans. Humans don't normally manually construct URLs. They navigate based on links from an entry point. (See also: https://hypermedia.systems/hypermedia-components/#_self_desc... )


The vast majority of people using REST do not follow its original definition, so the original definition doesn’t matter anymore.

It’s like human languages: REST is whatever we make of it, regardless of what academics say.


Sure. But then what words do you use to describe actual REST?

This keeps happening and all it does it cause confusion.

It's one thing to make up new words for new concepts so you can more easily refer to them in a conversation.

It's another thing entirely to give a word a vague but similar meaning without any clear way to differentiate between the original specific and new extremely nebulous concept.


HATEOAS adds that to REST.


H in HATEOAS stands for hypermedia but REST APIs must be hypertext driven.




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

Search: