- From: László Lajos Jánszky <laszlo.janszky@gmail.com>
- Date: Wed, 28 Oct 2015 18:47:17 +0100
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: "public-hydra@w3.org" <public-hydra@w3.org>
- Message-ID: <CA+=RcCo-skgfvn5H1QjF1R5A_08xfYU4Ca49kS8O7CJMNvfZNQ@mail.gmail.com>
I was wondering, is there a way to control the available links? I mean first, prev, next, last is not always enough. Even google use different type of pagination strategy. 3 random sites with pagination: 1. google `[f] [p] [5] [6] [7] [8] [9] [10*] [11] [12] [13] [14] [n] [l]` 2. garmin forum `[page-select-input] [f] [p] [41] [49] [50] [51*] [52] [53] [61] [101] [151] [n] [l]` 3. a random forum `[f] [p] [page-select-input] [n] [l] {items-per-page-select-input}` I assume we need a 5th link relation to describe other pages than first, prev, next, last. The page select input could use an URI template with the same link relation. 2015-10-18 21:18 GMT+02:00 Markus Lanthaler <markus.lanthaler@gmx.net>: > It looks like the latest pagination design [1] stroke the right balance and > finally allows us to move past this contentious issue. Briefly summarized, > the main issues of the currently specified pagination design is that the > collection and their pages are conflated which yields to a number of > problems in practice. This has been tracked as ISSUE-42 [2]. > > The proposed solution for that issue is to look at pages of a collection as > specific *views* on a single underlying collection instead of thinking of > the collection as the sum of its pages. More concretely, the proposal is to > - replace PagedCollection with PartialCollectionView > - replace firstPage/nextPage/previousPage/lastPage with > first/next/previous/last > - associate totalItems with Collection instead of PagedCollection > - remove itemsPerPage for the time being (we will likely re-introduce it > with a different name) > > The representation of a specific view on a collection would look somewhat > like this with the new proposed design: > > { > "@id": "http://api.example.com/an-issue/comments", > "@type": "Collection", > "member": [ ... ], > "totalItems": 150, > "view": { > "@id": "/an-issue/comments?page=3", > "@type": "PartialCollectionView", > "first": "/an-issue/comments", > "previous": "/an-issue/comments?page=2", > "next": "/an-issue/comments?page=4", > "last": "/an-issue/comments?page=498", > } > } > > > This serves as a call for consensus. Before I proceed with marking ISSUE-42 > [2] as resolved and implementing the changes in the spec, I would like to > ask if anyone has any concerns or objections against this proposal. > > Please submit your comments by Saturday, October 24th. > > > Thanks, > Markus > > > [1] https://lists.w3.org/Archives/Public/public-hydra/2015Oct/0121.html > [2] https://github.com/HydraCG/Specifications/issues/42 > > > -- > Markus Lanthaler > @markuslanthaler > >
Received on Wednesday, 28 October 2015 17:47:45 UTC