Should data sorting be done on the client or on the server?

前端 未结 4 576
刺人心
刺人心 2021-02-05 09:39

I get data from a server and want to display it using GWT on the client.

GWT is not the problem here, you can replace GWT by Ajax calls or you can transpose it to a real

4条回答
  •  醉话见心
    2021-02-05 10:29

    Ideally, the sort should be done on the server because:-

    1. It is best to assume that your client will be having low resources. For example, some people will launch the GWT app from a desktop but another may launch the GWT app from a iPad/phone which is having less CPU/RAM

    2. There are standard ways to do sorting on the server side, for example, by using SQL ORDER BY clause but you may have to implement your own routine/method to do the sorting on the client side.

提交回复
热议问题