5 ms·
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
by cmonnow 4y ago
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.