logoalt Hacker News

drdexebtjltoday at 2:05 PM1 replyview on HN

REST has issues if you limit yourself to think of the “resources” as your domain entities.

If you have a long running search, the resource is the search. Create a search. Fetch search results. Delete the search when you’re done.

Similarly, if you have a sufficiently complex command, the resource is the command itself. Maybe it requires async work, and you can later fetch the command results.

Anecdotally, this seems to be too big of a leap in mental model for beginners, mostly because all of the REST learning path does is teach you how to use it in CRUD domains.


Replies

speedgoosetoday at 4:25 PM

I think you provide good and accurate information. However, what you described sounds like a workaround to me.