I'm making an app where there is funtion that calcul user input and send them to the server, but I read somewhere that all my function should be done in the backend, whereas front-end javascript should only be about minor functionallity.
My question is simply should the backend do all the validation and calcul for my app instead of Frontend ?
Both.
First, lets assume that someone inspects your system and works out how to make the requests - what is to stop them making the request with bogus data, or with data skipping your validation?
However, back-end validation is slow and not great for user experience, so should be augmented with front-end validation. This is quick, providing validation in real-time where possible, but you must always expect the front end validation to fail or be bypassed in some way.