Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Thoughts on pagination with GAE
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
wings  
View profile  
 More options Nov 6, 5:55 pm
From: wings <david.mira...@gmail.com>
Date: Fri, 6 Nov 2009 14:55:12 -0800 (PST)
Local: Fri, Nov 6 2009 5:55 pm
Subject: Thoughts on pagination with GAE
Hello App Engine users!

I'm working on a small project that required pagination.

I found the pagination article on the app engine site[1], and it was
helpful. But when I was done implementing the approach described, I
was left with an extra layer of complication, ugly urls, and not even
a 'previous page' link.

So I put my thoughts together here: http://www.gomuse.com/pagination-by-date-with-google-app-engine-0

Please let me know what you think.

What I would really like to discover is a solution that is:
- efficient
- gives me a list of page numbers
- gives me a 'first page' and a 'last page' link

[1]: http://code.google.com/appengine/articles/paging.html


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Smith  
View profile  
 More options Nov 6, 7:23 pm
From: Joshua Smith <JoshuaESm...@charter.net>
Date: Fri, 6 Nov 2009 19:23:44 -0500
Local: Fri, Nov 6 2009 7:23 pm
Subject: Re: [google-appengine] Thoughts on pagination with GAE

I use a simple trick for Previous Page: onclick="history.go(-1)"

Also, instead of passing the date, you can pass the ID of the next  
object, and fetch it's date to figure out where to start.  That will  
eliminate all the encoding/decoding of dates stuff.

-Joshua

On Nov 6, 2009, at 5:55 PM, wings wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wings  
View profile  
 More options Nov 6, 9:39 pm
From: wings <david.mira...@gmail.com>
Date: Fri, 6 Nov 2009 18:39:51 -0800 (PST)
Local: Fri, Nov 6 2009 9:39 pm
Subject: Re: Thoughts on pagination with GAE
I really like that previous page trick -- thanks!

I'd rather not pass the ID of the next object because then I'd have to
do a datastore get in order to get its date.

It's definitely a good idea, especially since the encoding/decoding is
a hassle -- and it would get around the downside that I mentioned
(i.e. two entries posted at the same time wouldn't be a problem). I'll
consider it -- thanks!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Smith  
View profile  
 More options Nov 7, 8:18 am
From: Joshua Smith <JoshuaESm...@charter.net>
Date: Sat, 7 Nov 2009 08:18:10 -0500
Local: Sat, Nov 7 2009 8:18 am
Subject: Re: [google-appengine] Re: Thoughts on pagination with GAE

> I'd rather not pass the ID of the next object because then I'd have to
> do a datastore get in order to get its date.

Memcache!

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry Hunter  
View profile  
 More options Nov 7, 9:19 am
From: Barry Hunter <barrybhun...@googlemail.com>
Date: Sat, 7 Nov 2009 14:19:27 +0000
Local: Sat, Nov 7 2009 9:19 am
Subject: Re: [google-appengine] Thoughts on pagination with GAE
2009/11/6 wings:

> What I would really like to discover is a solution that is:

... wouldnt we all! I'm not sure its been determined that a 'true'
solution exists. ;P

Or at least a simple one. And one that works on massive datasets, like
AppEngine is meant to support.

Coming from mysql, its easy to think paging is a simple issue. Just
use a Count(*) and LIMIT on the queries. But that doesn't scale, its
horribly slow (but usually fast enough on small datasets)

In fact it reminds me of a saying I recently saw in a book:
"Fast, Accurate, Simple: pick any two"

Also re the 'previous' page link, memcache (again)! Store the 'cursor'
of each page in memcache (as you calculate it), and then on a page,
you can check memcache for cursor you need for the back link.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google