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

this whole discussion seems pedantic.

whether it is a local function or a remote function, both caller and callee need to agree on the parameters (input), and returns (output).

I send you X. You send me back Y. That's it - this is the contract we both agree to.

OP is saying - the caller should NEVER do anything with Y other than display it on screen, for it to be called REST. Well - why even display it, why not just discard it ? Calling print(Y) is as good as calling businesslogic(Y). Whatever further logic a human plans to do after print(Y), a machine can do the same.

In other words, REST is just step 1 of returning data from a remote function. The moment you code any additional logic on the returned data (which is 99% of use cases), it's not REST anymore ? Sounds like an extremely limited definition /use case of REST.



I found the discussion flat-out silly. It basically says something is only "self-describing" if it's an HTML blob, but in the example given, the JSON blob is actually easier to understand.

Sure, you can run the HTML through a browser and it looks nicer, but who cares? You can also render a JSON blob with a slightly different set of rules. And if we don't bother with the rendering on either side, it remains just as obvious what the JSON means.

If these people wanted their ideas to stand the rest of time, rather than merely the acronyms, they should have had better ideas.




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

Search: