User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Client-side pagination Page [1]  
hydro290
All American
1703 Posts
user info
edit post

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

RSXTypeS
Suspended
12280 Posts
user info
edit post

server-size/ajax pagination is so easy. why would you not do it that way?

5/12/2009 12:30:20 PM

BigMan157
no u
103352 Posts
user info
edit post

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 pagination

generally 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

hydro290
All American
1703 Posts
user info
edit post

there is a pager plugin that is bundled with the sorter

5/12/2009 1:06:14 PM

Ernie
All American
45943 Posts
user info
edit post

Quote :
"Ajax/Server-Side"


Do what

5/12/2009 1:07:45 PM

qntmfred
retired
40552 Posts
user info
edit post

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

quagmire02
All American
44225 Posts
user info
edit post

yeah, i didn't quite get that, either

5/12/2009 1:47:08 PM

RSXTypeS
Suspended
12280 Posts
user info
edit post

lol how did you guys not get ajax/server-side?

5/12/2009 2:13:58 PM

Ernie
All American
45943 Posts
user info
edit post

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

RSXTypeS
Suspended
12280 Posts
user info
edit post

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

Tiberius
Suspended
7607 Posts
user info
edit post

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

evan
All American
27701 Posts
user info
edit post

Quote :
"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."


basically.

5/14/2009 8:15:06 AM

CaelNCSU
All American
6883 Posts
user info
edit post

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

 Message Boards » Tech Talk » Client-side pagination Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.