I have a few tables of data on a web page that I need to paginate. I don't expect the tables to ever contain more than 200 rows. I'm hoping I can get by using client side pagination and jquery's tablesorter plugin.I know that for large data sets Ajax/Server-Side pagination is the better solution. At what point does Client-Side pagination start to become unrealistic? 100 rows? 1000? 10000?
5/12/2009 12:26:28 PM
server-size/ajax pagination is so easy. why would you not do it that way?
5/12/2009 12:30:20 PM
Does tablesorter paginate? I thought it just, you know, sorted.If i feel the need for paginating it at all, i'll do php or ajax right off the bat, i don't mess with that faux paginationgenerally if it's about 50-200 rows, depending on font size, etc., i'll leave it as a single page
5/12/2009 12:54:36 PM
there is a pager plugin that is bundled with the sorter
5/12/2009 1:06:14 PM
5/12/2009 1:07:45 PM
i think he means using ajax to retrieve a server processed and paginated set. as opposed to having the server send back the entire dataset and let the client handle the pagination entirely
5/12/2009 1:44:56 PM
yeah, i didn't quite get that, either
5/12/2009 1:47:08 PM
lol how did you guys not get ajax/server-side?
5/12/2009 2:13:58 PM
It wouldn't have been confusing if he said "AJAX + server-side"It reads like he thought AJAX is implemented server-side, that's all.
5/12/2009 2:24:23 PM
oh...haha...ok i see that now. I just read it as AJAX '+' Server-side and not an 'or'
5/12/2009 2:44:21 PM
I'd think client-side pagination starts to become unrealistic as soon as you're transmitting more rows of data than you can display on one page. Assuming "server-size/ajax" perhaps one leading and trailing page to buffer against load times, but even that's wasted bandwidth eh?
5/14/2009 7:18:52 AM
5/14/2009 8:15:06 AM
In JavaScript: function next() { if(currentLocation+pageSize > mydata.length) { return; } else { currentLocation += pageSize; display(mydata.slice(currentLocation,currentLocation+pageSize)); } }where display is a function that takes the data and outputs the table DOM for it. So yeah it's pretty easy. You can wire next() to the onclick of a link or button. In terms of performance, I've worked on apps that are ungodly slow for 1000 rows, that was more because the code that got the data was horribly inefficient. You can have it draw 1000s of rows and have it not be too slow but it's harder to search through. [Edited on May 14, 2009 at 8:26 AM. Reason : a]
5/14/2009 8:23:42 AM