A
A
Alexey ZloDeeV2016-06-07 11:51:25
CRM
Alexey ZloDeeV, 2016-06-07 11:51:25

Is it worth it to implement calculations on the front end?

If we assume that there is a semblance of CRM for business, where the customer wants most of the calculations to occur not manually, but automatically. For example, there is a list of supplied services from which an estimate is collected:

  • Estimate:
    • Service 1
    • Service 2
    • Service 3


Each service has several common parameters and quite a few unique ones. And all these parameters should be edited in the estimate itself. That is, the user adds a service from the database, sets the values ​​and expects an instant calculation of the final numbers here. It turns out that the backend simply enters information into the database and issues it on request, but the math is all hanging on the front. Is this normal practice?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Q
qweqwa, 2016-06-07
@ZloDeeV

To reduce the response time is normal on the frontend.
For security - you need to control on the backend.

S
SerzN1, 2016-06-07
@SerzN1

First rule - don't trust the front.
if the results of calculations are entered into the database, then you just need to count on the backend, and it would be better not to duplicate the functionality, and accordingly, on the contrary, you don’t need to enter it into the database and store it, then it’s better to calculate everything at the front.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question