Alex Rivera | Logout

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

Asked 2012-05-23T13:53:14.710
22

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 application instead of a web app.

Should the sorting be done on the server or on the client using JavaScript after receiving the data and before displaying them?

Edit
Report

1 Answer

8

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.

answered 2012-05-23T14:06:47.923

Your Answer