[dancer-users] Example of pagination with DBIC?

Jacques Lareau jack.lareau at gmail.com
Thu Oct 16 22:06:16 BST 2014


Since a GET will put parameters into the URL, you can just re-use the URL
and change the page parameter.
/?name=test&city=montreal&page=1 <- to change pages



On Thu, Oct 16, 2014 at 4:55 PM, John Stoffel <john at stoffel.org> wrote:

>
> Jacques> No. It's just more RESTful. I mainly build API with Dancer,
> Jacques> so I tend to follow a RESTful design.
>
> I'm familiar with RESTful ideas, just haven't made it work for me yet,
> but I'm not a programmer by trade and this is my side hobby at
> points.  So I really do appreciate all your help here.
>
> Jacques> GET is used to list/query a collection and also retreive an object
> Jacques> POST is used to create an object into a collection.
> Jacques> PUT to update an object
> Jacques> DELETE to delete an object
>
> Yup, makes sense.
>
> Jacques> Since you are quering a collection, I'd suggest using GET.
>
> Ok, so how would you save the query parameters so that each time you
> page through the results, they get submitted cleanly?  I'm looking at
> various simple pagination libs now to take the next step here.  And
> looking at the 'bootstrap' framework to make it look pretty.
>
> I've got bigger problems down the line, since I will need to replace a
> big date library and calendar generation library written in PHP if I
> want to move forward for one existing DB I offer searches for.  But
> that's not hear nor there.  Let me get the basics working better
> first.
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20141016/211314d6/attachment.html>


More information about the dancer-users mailing list