Reference Guide
This guide provides an overview of the concepts which form the foundation of Sequent. Most of these concepts are not specific to Sequent, but applicable to all CQRS and event sourced applications.
Basic flow
To illustrate the basic flow of a Sequent powered application, let’s use creating a User from a web application as example:
- Webapp binds form elements to a
CreateUser
Command - Webapp passes the Command to the CommandService
- The CommandService validates the Command
- When the Command is valid the CommandService calls the registered CommandHandlers
- The CommandHandler creates the User as an AggregateRoot and stores it in the EventStore using the AggregateRepository
- When the CommandHandler is finished, the CommandService queries all affected AggregateRoots for new Events and stores them in the EventStore
- All Events are propagated to registered Projectors
- The Projectors update their Projections accordingly.
Good to know: Points 1,2,5,8 are the steps you as programmer need to implement. Sequent takes case of the rest.
This is the general approach for making use of Sequent. Please explore all concepts to get a complete overview.
Concepts regarding your Domain:
- AggregateRoot
- Events
- CommandHandlers
- AggregateRepository
- Commands
- ValueObject
- Types
- Validations
- Snapshotting
- CommandService