M
M
Mozzarella2018-12-25 23:13:53
Software design
Mozzarella, 2018-12-25 23:13:53

Is the logic on the client or on the server?

Designing a repair estimate calculator with a 2D room editor.
Main feature: by the area of ​​the drawn room, calculate the work using formulas.
Now I'm planning a web application on react, with the ability to transfer to electron.
An important architectural question arises: where to write the logic on the client or on the server?
Benefits on the client

  • With state on the client, all recalculations are relatively easy to implement
  • No network load
Flaws on the server
  • Unnecessary traffic appears - for any parameter change, the server sends 100 - 500 changes as a result of formula recalculation
  • You will have to create a session to store the state

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir S, 2018-12-26
@hePPer

If the calculator is planned to be paid, then it is better to do the logic or part of it on the server, otherwise the paid one will be free.

A
Alexey, 2018-12-25
@AlexMaxTM

I think the answer is already in the question itself, since "Advantages on the client" and "Disadvantages on the server" were highlighted. Not a word was said about the advantages on the server, and the disadvantages on the client - it means that the choice was already made initially :)

A
Artemy, 2018-12-26
@MetaAbstract

Any data from the client must be checked and recalculated, which means that it must be on the server, and if it is on the server, then it can be used on the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question