liveBook · Manning

Pagination

As explained in Building Web APIs with ASP.NET Core

Client-side paging retrieves the complete result set and divides it into pages for display on the client.

Client-side paging retrieves the complete result set, then lets the client divide it into pages that users browse one page at a time. It suits an endpoint that already returns all board games, but large unordered responses can be difficult for clients to use. section 5.4 section 5.4.1

A client-side paging design involves these responsibilities:

  • The web API returns the complete data set in one response. section 5.4.1
  • The client creates the multipage interface and displays a limited number of results in each view. section 5.4.1
  • The client can browse pages without requesting each displayed subset separately from the server. section 5.4.1

Board-game results

A GET request to /BoardGames returns a large JSON list. The client consumes that complete list and builds a multipage board-game view, showing only a limited number of records at a time. section 5.4 section 5.4.1

Figure 5.5 A long list of board games
05-05

Use the long board-game list to see why a client may need to split a complete response into discrete pages. section 5.4

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Defines the client-server distinction and operating responsibilities, but does not provide client implementation steps.
Examples
Uses a large JSON list of board games returned from the /BoardGames endpoint.
What it assumes
Assumes a client application can receive the complete web API result and render multiple views.
What you can do after
Apply it by building a multipage client view from a complete result set.
How it connects
Connects paging with server-side paging, sorting, filtering, HTTP requests, and web API result sets.

Also explained in

Compare how 11 books explain pagination →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.