Skip to content

CQRS

Events are facts, the bus is plumbing

A domain event describes something that already happened. It is a fact, not an intention. Yet many codebases publish events from inside the entity, at the moment its state changes, which couples the entity to infrastructure and lets you announce a fact before it is even true in the database.

The third mode: when bus and direct coexist

Most architecture discussions treat the bus question as global. Either the whole application routes commands and queries through a CQRS bus, or none of it does. That framing forces a bad trade: pay CQRS boilerplate on a homepage that displays a greeting, or drop the bus on a module that genuinely needs events and transactions. The real unit of decision is not the application. It is the module.

CQRS everywhere? No, only where it's useful

In many PHP projects, CQRS is applied systematically. Every operation goes through a Command or Query Bus, with handlers, middleware, and event dispatching. For a homepage that displays three statistics, that is pointless boilerplate.

CQRS is not the problem. Its systematic application is.