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

>I mean if I need to run some reports it had better be called "runReports()" not some janky update of a state of some 'report' object to change it to 'running' state. So silly. REST is so jank.

I fail to see how that's janky, it sounds like a great abstraction. I would have a 'createReports()' method that returns an array of Report objects that all correspond to a record in a database. Easy to query for the state, id, or any other details I might need. Doesn't get any cleaner than that in my opinion.



Yes, we agree. What I meant is I'd have a verb that creates and returns some kind of "ReportContext" object, which sends back an "id" which I can then query status of later, for example. But no REST.

My point is that the entire endpoint would be mostly verbs (like runReports) and use only the HTTP POST to communicate. So I'm "ignoring" the fact that it's running over HTTP, I would ignore every "rule" of REST, because REST offers nothing but hurdles to jump over.




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

Search: