Search⌘ K
AI Features

Commands

Explore how commands function as key domain activities in Domain Driven Design, representing user-initiated actions like creation, update, and deletion within a bounded context. Understand the role of commands in changing system state and how they align with ubiquitous language to maintain clarity in code.

Let us imagine a situation where a customer wants to execute an action in a bounded context, such as buy an object, transfer money, or watch a film.

In this case, the system will receive a request and execute the action that was requested. The execution of this action can be successful, or it can fail. When it is successful, it will change the system state.

What are commands?

Commands are the first of the three activities that can occur in a domain, and it is broadly used in a pattern called Command Query Responsibility Segregation (CQRS). Commands ...