Hacker News new | ask | show | jobs
by jauntywundrkind 909 days ago
I was pretty annoyed expecting some awful conclusion that we had to do something entirely different, resting upon what felt like extremely shaky grounds. A one-auarter decent OpenAPI will elaborate what endpoints do, which felt like all that was missing.

In the end though, the author isn't really arguing against what we have, expect they want /commands and /queries prefixes.

Given the way some endpoints can be overloaded with disparate behaviors, I don't disagree that sometimes it can be confusing for all the verbal to apply to an endpoint. But POST /students/enroll seems more than fine to me, and trying to wrestle out a new norm, where URLs aren't broken down by resource type but are broken down instead by behavior-class seems absurd & a folly.

> The fundamental issue with REST is that it defines operations that manipulate data structures. It’s about structure and structural changes, not behaviour. It’s imperative, rather than declarative.

If it's about structure, wouldn't that be declarative? Aren't behaviors typically imperative (move this here, drive that there)?