Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Processing file on front-end vs back-end

I am developing a web application with angularjs as the front-end and a CRUD service at the backend. One of the requirements is to allow the user to upload a csv file containing a list of items to be created. This can be implemented on the front-end by parsing the file in javascript and making create API call to the server for each item. However, I am an not sure if this approach is better than passing the file to the server and doing all the processing there. What are advantages/disadvantages of both these approaches? What is the common practice in such a scenario?

like image 588
vjain27 Avatar asked Aug 04 '15 13:08

vjain27


People also ask

What is front-end and back end process?

Front end and back end development are two vital areas of coding. Front end development describes that programming that is done to a site to impact the client-side or the user side of a website or application. Back end development is the programming done to the server-side or the side that only a developer sees.

What is the difference between front-end and back end application?

Front end development is programming which focuses on the visual elements of a website or app that a user will interact with (the client side). Meanwhile, back end development focuses on the side of a website users can't see (the server side).

Should I focus on front-end or backend?

Even if your ultimate goal is to become a back end or full stack developer, experienced developers might recommend that you master front-end development first. By understanding how the front end of websites are built, you can identify ways to make applications run more smoothly behind the scenes.

What is front-end processing?

Front-end processing aims to collect information from the cardholder via the merchant and send it to the appropriate parties. This information is collected and routed through a payment gateway.


1 Answers

There are 4 things that I would use to make this decision:

  1. Do you have very high load. If you parse it on the client you are using the clients CPU. Parsing it on the server could cost you by needing more CPU's.

  2. Access to developer talent, is your team more productive programming it on the client or the server side.

  3. If the answer to the above does not give a clear answer, then I would put it on the server side as it would be easier to test.

  4. Will the "upload TSV" functionality be used by other parties/apps, who consume your API -- or is only the frontend using this functionality ?

like image 97
Shiraz Bhaiji Avatar answered Sep 22 '22 10:09

Shiraz Bhaiji