I have read in the past that pagination will move from Rails core to a
plugin with Rails 2.0. It seems like some of the core developers (eg.
DHH, Molena) now think pagination is poor design. What do they suggest
as an alternative. Does anyone have a link to a blog title something
like "life after pagination"? I'm not quite sure how an email
application would work without pagination.
> I have read in the past that pagination will move from Rails core to a
> plugin with Rails 2.0. It seems like some of the core developers (eg.
> DHH, Molena) now think pagination is poor design. What do they suggest
> as an alternative. Does anyone have a link to a blog title something
> like "life after pagination"? I'm not quite sure how an email
> application would work without pagination.
There are two objections to pagination:
- the concept is unhelpful because, as usually implemented, numbered
pages have no semantic meaning to help you navigate. E.g. Google's
list of pages of search results -- what's the difference between page
9 and page 10?
- the implementation in Rails is suboptimal
The first objection can be addressed by using meaningful page
navigation. E.g. for a list of people, make the paging links
alphabetical rather than numerical.
A number of people have written their own pagination plugins to
address the second objection. For example:
On 12/30/06, Andrew Stewart <bo...@airbladesoftware.com> wrote:
> On 30 Dec 2006, at 16:47, Peter Michaux wrote:
> There are two objections to pagination:
> - the concept is unhelpful because, as usually implemented, numbered
> pages have no semantic meaning to help you navigate. E.g. Google's
> list of pages of search results -- what's the difference between page
> 9 and page 10?
Interesting. is this really the main objective to pagination? In the
case of google the the search rank decreases with increasing page
number. In the case of email the email age increases with increasing
page number. These seem quite natural to me and I'm interested if this
is the real objection to pagination because people don't seem to have
a problem understanding what the page numbers mean in google or email
> - the implementation in Rails is suboptimal
> The first objection can be addressed by using meaningful page
> navigation. E.g. for a list of people, make the paging links
> alphabetical rather than numerical.
> A number of people have written their own pagination plugins to
> address the second objection. For example:
Thanks for the link, I'll check it out.
AFAIK the main objection to the current paginator was that it is
inefficient and poorly implemented. Someone already linked to the
paginating_find plugin but I personally like Bruce William's
paginator. Its available as a gem and I have vendor'ed it in merb.
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
I felt that some basic level of authentication was among the "common
case" scenarios for Web apps, but it was deemed "better left for a
plugin." Now we have zillions of authorization and authentication
plugins and no clear winner. I feel we'd have the same issue with
pagination if some basic level of support were not present in Rails.
Consider this a plea to keep pagination (I know I won't convince
anyone about authentication :).
I posted some example code at the Google Groups Ruby on Rails: Talk
forum, which I now see mirrors this one. (
I can't see a way to post the files here, but this here's what I posted
I wanted to do semantically-meaningful pagination, using Bruce William's
paginator gem. It had to paginate results from Nate McNamara's
search.rb. The resulting page had to let users browse multiple pages of
results without losing their search or their minds.
I refactored the code to move the docs and labels arrays into session
scope, so that they're only invoked once per search. Now the initial
search may take a while, but the navigation of the pages goes pretty
inspiring in a graphical sense, but it does what I want. It uses the
'title' attribute of the submit button to give users the semantic
content of the first record on a page as a tooltip. I find I can
navigate through a 2000-hit search result and get to the record I want
in 3-4 clicks.
If anyone wants to use it or critique it, great.
Posted via http://www.ruby-forum.com/.
The paginating_find plugin automatically counts the total number of
records based on the specified find options, supports paging has_may
associations, and even supports paging with_scope. Recently, I also
committed helpers for pagination links courtesy of Ben Curtis (thanks
again, Ben). If you use the paginator gem instead of paginating_find,
you're left up to your own devices to implement these extra features
on your own.
Either way, it's just a matter of selecting the tool that works best
P.S. Thanks for all your great work on merb, Ezra. =)
On Dec 30 2006, 2:56 pm, Ezra Zygmuntowicz <ezmob...@gmail.com> wrote:
> Hey Peter-
> AFAIK the main objection to the current paginator was that it is
> inefficient and poorly implemented. Someone already linked to the paginating_findplugin but I personally like Bruce William's
You're right, Alex -- one reason I chose the paginator gem was that it
didn't "duplicate" all those other Rails functions. It made a simpler
tutorial: just get your search results by whatever means, and let
paginator do the splitting up.
It's nice to have options!