these working APIs just to use the same framework. We do need a common way to handle all these changing things though. What lets us plug in new functionality really easily?
that we want to do something. Event buses to inform our domain that something has been done. Action-Domain-Responder pattern to control the interaction between the framework and the command bus.
take a Command object (which describes what the user wants to do) and match it to a Handler (which executes it). This can help structure your code neatly.”
(0.x - 1.x) had the “Dispatch cycle” SPL Observer/Subject for implementing Observer pattern Symfony Event Dispatcher (et al) Bounce (coming soon) The Evolution of Event buses in PHP
Extremely easy to test Command bus abstracts the Command-Handler relationship Event bus manages the many-to-many Event/Listener relationship Command Handlers AND Event Listeners
Request into a Command Command Bus easily mocked to test HTTP adapter. Interactions between services within the Domain abstracted away. Can write the HTTP side of the app without knowing any domain services
be as smart or dumb as you like Multiple events can populate the Responder CQRS and Command/Events fit well together Self-validating DTOs allow you to “read your own writes” “Succeed or Throw” makes application logic simpler.