5
We all know the agility that certain code written on the front end has and makes our applications faster.
It would be correct to calculate a freight at the front end of the application and send this data to the back end?
And, in the back end, we would do a check again to validate this. Of course, without harming the execution on the client. That is, totally outside (the part), can even be implemented in a queue at a certain time of the day or night.
It is not wrong! Doing so would be good for the user to be able to simulate several different calculations... But, it is necessary to do what you said... Validate everything in the back-end, including re-doing the calculation to see if there was any "trickery".
– Andrei Coelho
No, but it is necessary to make a final validation in the back-end
– X4vier
And in doing so, you temporarily dishonor the server until the user chooses the ideal freight.
– Andrei Coelho
Instead of reviewing at a certain time, you can review in an asynchronous way in the back end and depending on the volume of operations you can even allocate a specific server to not impact the system.
– Augusto Vasques
Yes is what I want the difference between the response time is gigantic can not compare, but always the need to have more code because will have to have two validations even if this can be in certain cases at different times.
– André Martins