In
Exploring the Commands, Command Bus and Command Handler, we looked at the command handling aspect of CQRS using Axon. We created commands that were dispatched into a command bus via a command gateway, which were then subsequently handled by their respective command handlers.
But in that post, all the command handlers did was to print to the console. In real life applications, you would want the commands to lead to state change within your application. Achieving this is what we look into next, but for us to do that, we would first need to explore some concepts that stem from the Domain Driven Design world. Namely Entities, Aggregates, Aggregate Roots, Repositories and Domain Events.
At this junction, it is worth mentioning that concepts and ideas from DDD always pop up in a typical CQRS discussion...this post and others in the series are not an exception, therefore, at least a basic understanding of these DDD concepts will be beneficiary.
This post will provide a quick overview of the relevant DDD concepts without touching on Axon Framework, while the next post will look at how Axon is used for their implementation.
That been said, let us quickly have an overview of the relevant DDD concepts that we will be needing in our exploration of CQRS with the Axon Framework.