When pagination disappears what to do?

Hi,

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.

Thanks,
Peter

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:

http://cardboardrocket.com/pages/paginating_find

Regards,
Andy Stewart

Hi Andy,

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
apps.

- 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:

http://cardboardrocket.com/pages/paginating_find

Thanks for the link, I'll check it out.

Peter

Hey Peter-

  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.

http://paginator.rubyforge.org/

Cheers-
-- Ezra Zygmuntowicz-- Lead Rails Evangelist
-- ez@engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)

Without commenting on the implementation of Rails pagination, I find the idea that page numbering is of little semantic value a poor reason to deprecate the feature. Surely, "next" and "previous" have semantic value. In any list-like application, one will either have to display all the records on one page or use some pagination. I've read about the Ajax replacement for pagination, and while nice, it may have usability issues.

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 :).

Steve

Okay, I finally found a way to post this topic: check
http://wiki.rubyonrails.com/rails/pages/HowToPaginateSearches

To be fair, the paginator gem really only does a subset of what the
paginating_find aspires to be. In fact, I've been considering using
Bruce William's paginator in place of my own paging enumerator (http://
svn.cardboardrocket.com/paginating_find/lib/paging_enumerator.rb).

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
for you.

-Alex

P.S. Thanks for all your great work on merb, Ezra. =)