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
--
JavaScript for Rails: http://forkjavascript.org
> 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:
http://cardboardrocket.com/pages/paginating_find
Regards,
Andy Stewart
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
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.
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
-- e...@engineyard.com
-- 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 :).
Steve
I posted some example code at the Google Groups Ruby on Rails: Talk
forum, which I now see mirrors this one. (
http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/7267090150ef6cc7?hl=en)
I can't see a way to post the files here, but this here's what I posted
(2 posts)
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.
And:
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
quickly.
It works, and uses plain old html, no javascript. I can't say it's
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.
Ron
--
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
for you.
-Alex
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!