I look at situations in database-oriented web applications where you need to rely on client-side table sorting when server-side sorting. One particular situation that bothers me is pagination.
When trying to split a page into a large table (say 10,000 rows) and also sort it by a specific column, what would be the best approach?
I understand that some of the problems associated with this:
- I cannot return the entire table to the client side at a time.
- I cannot sort up to 10,000 entries using javascript
- Sorting the table will include sorting the rows on all pages, not just the current page.
Do you have more questions to add to this list?
Which approach would lead to a good combination of client-side and server-side interactions to minimize server load?
Addition:
Well, sorting by database and returning the reqd page, the best page and the next page seems to be the best choice.
Now consider the following:
The user is on the page (3 of 10) of the table, sorted by serial number. Now the user clicks on the header with the name "username", wanting to sort the table by username.
Quesion: If the end result is "a page (1 out of 10) sorted by username" or should there be a "page (3 out of 10) sorted by username"?
I know this is a very subjective question, but what would you recommend and why?
sorting html-table web-applications pagination
jrharshath
source share