Reputation: 641
Suppose I have a client that sends some RunLogicCommand with input to a server. The server responds with some output which is a report for the user to verify. At this point, the server has not persisted anything. The client then sends back the entire report in a separate SaveCommand which will then persist the report data.
To me, certain parts of this exchange seem unnecessary. That is, once the user has verified the report, it seems unnecessary for them to send the entire report back to the server for persistence. Perhaps there is a chance some sensitive data could exposed here as well?
What is the typical approach in this case?
I can see two options:
Are there any problems with either of these approaches? Is there a better, more typical approach?
Thanks!
Upvotes: 0
Views: 38
Reputation: 65431
There is no single best solution here:
The cons for the approach you mentioned firsts are:
The cons for the first of your two options are:
I would use a variation of your second option:
Upvotes: 1