ecommerce
ecommerce copied to clipboard
Pass cqrs object everywhere consistently
Now in some places it's event store. (another debate how to rename this object)
RBS helps tracking down such unintented usage.
In RES we've used it to ensure common interface for repositories. We had a signature file describing accepted types and there was a verification step when running units:
env RBS_TEST_LOGLEVEL=error rbs test RBS_TEST_RAISE=true --target RubyEventStore::InMemoryRepository rspec
as for the "renaming" debate - new candidates: Bus or MessageBus
I think I'm ready to remove this whole cqrs/bus object at all, back where it was and pass both event_store and command_bus where needed. The process methods and other DSL could be then extracted to classes like Infra::Process.new(event_store, command_bus.
The feature was removed.