Navigating the catalog
Real online stores have too many products to sensibly display them all to the user at the same time and typically provide tools to help the user find and select what they want. In the sections that follow, I will add features to SportsStore that will allow the user to navigate through the catalog by choosing the data that is displayed.
Paginating catalog data
Pagination presents the user with manageable blocks of data, along with controls to move from one page to the next. The pagination controls give the user a sense of how much data is available, and individual pages require the server to send smaller amounts of data in each response, which can reduce the amount of time the user has to wait for data to be displayed. The drawback of pagination is that it requires the server to handle a lot of HTTP requests and make a lot of database queries as the user navigates through the data.
When processing a request for a page of data, the server needs to...