I do web/mobile development professionally, but there is something that has bugged me for a bit and I was wondering what other peoples opinions are.
For the back-end, I write C#/.NET CORE Web APIs that run on Azure/Dotnet which use EFCore to talk with the database (MSSQL). For the front-end I use Typescript/HTML5/CSS.
There are things that I can do server side OR client side and am never 100% content with my decision to do one over the other. A quick example would be sending an analytics object. Does it make sense to rely on the API to send down the perfect structured/calculated analytic data for each field or should I send the raw dataset down and let the Typescript do the structuring. To what extent should I do processing/formatting/calculating server side vs. client side?
Should I have the API do the heavy lifting, or let the client take over and let the users pc/device do the work? I know things like basic validation can be done client side without a round trip, but when it comes to the actual JSON objects coming down, is it smarter to just let the API build it fully, or just send down the raw data and let client build it.
Question
firey
I do web/mobile development professionally, but there is something that has bugged me for a bit and I was wondering what other peoples opinions are.
For the back-end, I write C#/.NET CORE Web APIs that run on Azure/Dotnet which use EFCore to talk with the database (MSSQL). For the front-end I use Typescript/HTML5/CSS.
There are things that I can do server side OR client side and am never 100% content with my decision to do one over the other. A quick example would be sending an analytics object. Does it make sense to rely on the API to send down the perfect structured/calculated analytic data for each field or should I send the raw dataset down and let the Typescript do the structuring. To what extent should I do processing/formatting/calculating server side vs. client side?
Should I have the API do the heavy lifting, or let the client take over and let the users pc/device do the work? I know things like basic validation can be done client side without a round trip, but when it comes to the actual JSON objects coming down, is it smarter to just let the API build it fully, or just send down the raw data and let client build it.
Link to comment
https://www.neowin.net/forum/topic/1362302-server-side-vs-client-side-logic/Share on other sites
1 answer to this question
Recommended Posts