If I have a list of products and I need the total price of those products. Where is better to calculate the total sum, back end or front end?
- Front end React
- Back end PHP
- Table that shows Invoices list
All business logic must be done on the backend. On some cases you can replicate on front end (for quick feedback to the user) but never as the source of truth.