3 ms·
I’d say they’re right: cursors are way better for an API. Pages are way better for a person. This here is about an API.
by masklinn 6y ago
I’d say they’re right: cursors are way better for an API. Pages are way better for a person. This here is about an API.
- matt-attack 6y agoWell good luck giving your users direct page access when your API only supports cursors.
- tstrimple 6y agoHow often do people really jump to an arbitrary page? I'd say filtering / searching capabilities are far more important for users than paging.
- _nothing 6y agoIt depends? If I'm looking for a new desk on IKEA's online catalog then I care more about filtering/searching, but if I'm reading through a conversation on a forum and want to be able to link to certain sections then I want that paginated.
- tshaddox 6y agoBut even for the latter case, surely you're not specifically interested in a specific page called "page 50" but rather you're interested in items satisfying some predicate (like "posts from 2 weeks ago") or locations respective to the entire list (like "halfway through the list"), and it would be much better if the user interface supported those sorts of navigation.
- gls2ro 6y agoHere I think it makes sense to split the API in two classes: 1. APIs consumed by other backends lets call them API2B 2. APIs consumed by frontends lets call them API2C In this case cursors are better for API2B but not for API2C as in case of API2C most users expect to be able to jump directly to a specific page. At least when I am designing an API i take different decisions based on this split. For example in case of API2C I always want to see FE design even if I work on backend.