I’ve opened a Github account where i keep some stuff I’ve been playing with recently. At the moment is mostly related to doing DDD with CQRS and Event Sourcing.
I’ve created a sample project to demonstrate the concepts. Here is a short description of the sample:
Sample project demonstrating CQRS & Event Sourcing
The sample uses the following projects from Jonathan Oliver (https://github.com/joliver)
For more information on CQRS and Event Sourcing http://cqrsinfo.com/
A short description of the projects in the sample:
a. Write Side
– the domain model for the sample
– this model is persisted using event sourcing and does not need to handle reads ( queries )
since they are done on the read side.
– the resulting event stream is the "source of truth" data.
– the handlers for the commands our domain knows to execute
– infrastructure for wiring up the command handlers to NanoServiceBus
– this is the actual instance of the service that needs to be running for the write side to process
b. Read Side
– the read model on witch queries are executed
– this model should be mapped as close as possible to the views
– this model can be regenerated from the event stream
– the event handlers for the domain events that are published by the DomainModel on the Write Side
– this handlers keep the read model in sync with the event stream
– a better name for it is welcome
– infrastructure for wiring up the event handlers to NanoServiceBus
– this process needs to run for the read side to be updated.
– definitions for commands and events that are handled or published by the Domain Model
– ASP.NET MVC3 application that demonstrates how to integrate the Write Side & the Read Side in an application.
- Add more complex objects to the domain
- Review transaction management on integration points
- use ConfOrm for mapping the read model
I’d be glad if other shared their comments on the code there.