This document discusses using a command bus architecture to handle application commands. It begins by showing an example controller action that updates a product entity, representing a "controller driven" approach. It then introduces concepts like separating application layers and using commands to capture user intent. Commands are defined as immutable message objects that are passed to command handlers for processing rather than calling controller methods directly. A single handler class is defined per command to focus processing logic in one place. The command bus is responsible for dispatching commands to their corresponding handlers. This shifts the application to being more intent-focused and decouples the layers.
Related topics: