Consider a web application that works with somewhat sensitive data on reliable, high performance clients.
The data needs to be processed and manipulated. So far I have learned that when possible, data processing should be a serverside concern because of the following reasons (amongst others)
-
There is no data exposed that shouldn’t be
-
You can’t rely on client performance
Nevertheless, I would like to to processing clientside because of the following reasons:
-
There are a lot of operations that need to be done on the same set of data. If i would do them serverside, I would have to do a lot of requests which will cause ugly & bloated client side code. If I do things on the client, I can use a convenient service which exposes a neat API. This is the main reason for me.
-
If I load the data on initialization, I don’t have to rely on the server further.
-
The application is used in-house only. I know the clients and don’t have to burden the server with operations I know the client is perfectly capable of doing.
So, when can I do data operations client side with good conscience?
Yes, you can.
If the your data operations are about a set of data specific for a client, they should be done on the client.
They are not “data operations” as usually meant. Work on data obtained belong not to data server
, but to application server
. And the last can easily be done more thin making clients a bit thicker. It is not against some common rules. Finding the correct balance is wholely on you.