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
One should be careful of an all-inclusive statement that it is ALWAYS faster to sort on the server than on the client. I had a case where I was returning several thousand records sorted by the concatenation of the last name and first name. Neither one of these fields were indexed and I had no control over this. As we know, sorting concatenated strings is not something the database does well intrinsically. It looks numbers and/or indexed fields. Sorting on the client in this case ended up being faster. If I had the control over the database, I would have placed a function index in Oracle on these two fields.
The moral of the story is to ASSUME NOTHING and profile your application to find out what works best for your scenario.
It depends... :)
Architecturally speaking, to answer this question you need to decide on the desired properties in your system and evaluate the trade-offs among various design alternatives. Without knowing more about your system it is difficult to offer advice beyond this.
Each approach has its pros and cons:
Ideally, the sort should be done on the server because:-
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
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.