By Jose Celano
A symfony sample application using DDD.
The purpose: testing some DDD concepts using Symfony.
- User can register
Symfony standard installation.
Command and Event Bus by Matthias Noback
- Store events (DDD-CQRS)
- Handle events asynchronously (for better performance)
- Log events (for debugging)
- Use message queue (ActiveMQ and RabbitMQ) to send messages between different application modules
Security layer Michiel Uithol
- Authorization, where: command, app service?
- Agnostic base repository (implementations with Doctrine, MongoDB, ...)
- Is possible to use doctrine with annotations and keep domain decoupled? I have seen some people store view instead of domain entity.
- Where to put validation: command, domain service, repository?
On order to test Matthias Noback message bus sample using asynchronous events bus must run this Symfony command to pull events from the message queue:
´´´´ php app/console matthias:user:asyn-event-subscriber ´´´´
Stomp message queue parameter are defined in ´´´´parameters.yml´´´´
´´´´ # stomp message queue stomp_host: 127.0.0.1 stomp_port: 61613 stomp_default_queue: /queue/foo stomp_user: admin stomp_password: adminPassword ´´´´
- https://github.com/tyx/ddd-sample-symfony
- https://github.com/leopro/trip-planner
- https://github.com/tyx/cqrs-php-sandbox
- https://github.com/SimpleBus
-
http://www.whitewashing.de/2013/09/04/decoupling_from_symfony_security_and_fosuserbundle.html
-
http://www.whitewashing.de/2012/08/22/building_an_object_model__no_setters_allowed.html
-
http://verraes.net/2013/04/decoupling-symfony2-forms-from-entities
-
http://williamdurand.fr/2013/12/16/enforcing-data-encapsulation-with-symfony-forms
-
http://php-and-symfony.matthiasnoback.nl/2015/01/a-wave-of-command-buses
-
http://php-and-symfony.matthiasnoback.nl/2015/01/responsibilities-of-the-command-bus
-
http://php-and-symfony.matthiasnoback.nl/2015/01/from-commands-to-events
-
http://php-and-symfony.matthiasnoback.nl/2015/01/collecting-events-and-the-events-aware-command-bus