hey,
from the I/O Session [1] i can see how to create pagination based on
indexes that doesn't rely on database offsets. but the example is
plain simple and I am intrigued in how to do some more complex
pagination in a "app-engine way". in the I/O Session example, you
fetch 1 extra record to know if you have a next page, and based on
that and the current page's pagination data, you can create "previous"
or "next" links.

now, what if we want to create a pager with links to a range of pages
(the common pager we use everywhere: << previous 1 2 3 4 next >>)?

to know how many items we have to paginate we can set a sharded
counter (using the awesome class from our fellows here :), but how to
fetch the data related to the requested page in a consistent way? or,
better, how to keep the index consistent? let's say i'm displaying 20
items per page, so have the links:

  * page 2: /my-page?start=20
  * page 3: /my-page?start=40
  * etc.

now, if I delete items 23, 24 and 25, my page 2 will have 17 items
instead of 20. to avoid this, I'd have to rebuild the index when items
are removed, which is undesired.
do you have other ideas?

i'd want to keep it efficient and relativelly simple, and maybe i'm
just trying to do what i should not try to do. what do you think?

-- rodrigo

[1] 
http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to