News for hackers. Stuff that matters.
Re:REST Anti-patterns by jnbiche on Monday September 12, 2016 @12:12PM (#12480924)
> What if 'status' isn't a column in the account database? What if closed_accounts is a join table or something else? Then wouldn't adding a /close route be hiding idiosyncrasies in your data model, not the other way around?

So what? REST is an API [0]. It's the public interface you expose. What you do behind the scene in your data model is, or should be, irrelevant to the API. Sometimes you'll map your data model practically one-to-one to the REST API, but there are times when I do significant logic in controllers before mapping the result of that logic to a resource. As long as the API is resource oriented and follows good REST practices, it's all good.

0. OK, REST is one way to expose an API, since the wording I used is not amenable to some people.

Re:REST Anti-patterns by dragonwriter on Monday September 12, 2016 @12:14PM (#12480947)
> REST is an API.

No, REST is an architectural style.

Re:REST Anti-patterns by jnbiche on Monday September 12, 2016 @12:20PM (#12480991)
> No, REST is an architectural style.

For APIs. But yes, we can argue semantics now. My point is, REST is a way to expose an API.