In this chapter, you were shown implementations that follow the action-domain-responder software design. The first section discussed how pagination can be accomplished by using the skip and limit parameters, used in conjunction with the pymongo.collection.find* methods. The practical application shown was to paginate a customer's purchase history.
You then learned how to service product photos directly out of the MongoDB database using HTML image tags and Base64-encoded data. Next, you learned about jQuery and DataTables, and how to incorporate them into a web application. When configured, the data table makes AJAX requests of your application, which then performs a MongoDB lookup, returning the results as JSON.
Finally, you learned how to configure a web script to accept REST requests that detect the HTTP Accept header, and determine which JSON data format to produce: JSend, JSON:API, or hal+json.
In the next section, you will learn how to design advanced data structures...