[Koha-devel] REST api / pagination

Tomas Cohen Arazi tomascohen at gmail.com
Thu Aug 24 17:22:04 CEST 2017


El jue., 24 ago. 2017 a las 12:14, Michael Hafen (<michael.hafen at washk12.org>)
escribió:

> What about the fourth option of returning all the results and letting the
> client handle pagination?  There are many good javascript / jquery
> libraries that can be used for sorting / paginating a table.
> Also, pagination should be an option in the api, to preserve present
> behavior.
> I think if the api's present behavior is to return all results, then I
> would prefer your suggestion a as an added mechanism; from a user
> standpoint pages make more sense then limits and offsets to me.
>

Just to clarify, what I'm proposing is adding an OPTIONAL set of query
parameters to allow API consumers to get paginated results. This is by no
means a proposal to change the current 'get all' behaviour.

Also, if you have (say) 50000 patrons on your library, what's the point of
fetching them all at once only to display (say) 20? The user experience
would be enhanced if we only fetched what is needed (a page) and probably
the next page (or couple next pages) in background while the user is
reading the current page. I'd leave that to UI frameworks/tools as you
suggest, though.

Thanks for you feedback! I count it as +1 for (b) :-D

-- 
Tomás Cohen Arazi
Theke Solutions (https://theke.io <http://theke.io/>)
✆ +54 9351 3513384
GPG: B2F3C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20170824/b3c4bf0d/attachment.html>


More information about the Koha-devel mailing list