September 2023
Intermediate to advanced
470 pages
11h 12m
English
We could implement the createToDoList method on the hub, as we did for the addItemToList, but it’s now time to introduce a new pattern.
We want to treat the operation that can change the state of the system with particular care. To do so, we can use a command-oriented interface for our internal API.[31] Using this style—which incidentally isn’t limited to functional programming—gives us more flexibility and control of what will change our state. As Martin Fowler says, this allows us to “easily add common behavior to commands by decorating the command executor. This is very handy for handling transactions, logging, and the like.”
Using a command-oriented interface means that instead of having many methods on ...
Read now
Unlock full access