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 -- JavaScript for Rails: http://forkjavascript.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 30 Dec 2006, at 16:47, Peter Michaux wrote:> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Andy, On 12/30/06, Andrew Stewart <boss-rAnrN1QAkGGttCpgsWEBFlaTQe2KTcn/@public.gmane.org> 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_findThanks for the link, I''ll check it out. Peter -- JavaScript for Rails: http://forkjavascript.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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-NLltGlunAUd/unjJdyJNww@public.gmane.org -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Dec 30, 2006, at 12:56 PM, Ezra Zygmuntowicz 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_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-NLltGlunAUd/unjJdyJNww@public.gmane.org > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 ended up with an app that does what I want, but I am pretty sure there''s a more "railsy" way to do it. So, if you are buffaloed by the whole pagination thing (and it seems that many people are), then this is a working example as is. My main purpose in posting, though, is to solicit refactoring suggestions: if you feel moved to contribute any, please do! Ron --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. Ron --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ezra Zygmuntowicz 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_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/. . . 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/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Okay, I finally found a way to post this topic: check http://wiki.rubyonrails.com/rails/pages/HowToPaginateSearches --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok, I posted a tutorial at http://wiki.rubyonrails.com/rails/pages/HowToPaginateSearches That''s working for me. Ron -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
alexkwolfe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-05 20:17 UTC
Re: When pagination disappears what to do?
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. =) On Dec 30 2006, 2:56 pm, Ezra Zygmuntowicz <ezmob...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 > 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...-NLltGlunAUd/unjJdyJNww@public.gmane.org > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
alexkwolfe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> 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. =)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! Ron -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---