January 2020
Intermediate to advanced
288 pages
6h 45m
English
This chapter covers
We’ve looked at how objects can be used to retrieve information or perform tasks. The methods for retrieving information are called query methods, and the ones that perform tasks are command methods.
Service objects may combine both of these responsibilities. For instance, a repository (like the one in the following listing) could perform the task of saving an entity to the database and also retrieving an entity from the database.