Skip to content

Architecture

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.

Is a Clean Architecture framework a contradiction?

"Clean Architecture framework" reads like an oxymoron. Clean Architecture is about independence from frameworks: the framework is a detail you keep at arm's length so your business code never depends on it. A framework, in the usual sense, is the opposite. It imposes its conventions, it lives in vendor/, and you depend on it by version. Someone raised this objection to me, and it is fair. So which one is Phexium?