Biglietti, prego! - A ticket for the (command) bus

61
Biglietti, prego! a ticket for the (command) bus Francesco Face @magobaol

Transcript of Biglietti, prego! - A ticket for the (command) bus

Biglietti, prego!a ticket for the (command) bus

Francesco Face@magobaol

Ticket Office

Un compagnia di treni ad alta velocità ci ha commissionato un

sistema per la vendita di biglietti online

Liberate i cani!

La vita è una sola, falli magna’ ‘sti controller.

Disclaimer: @agilegigi non ha mai detto questa cosa, ma secondo me potrebbe farlo.

e poi #lunedìcepensamo

Meet the Command Bus

Meet the Event Bus

@leopro

Cosa è un comando?

È un messaggio tramite il quale si comunica al sistema che si vuole fare qualcosa

[ request ]

[ command ]

[ command bus ]

[ command handler ]

(non restituisce nulla)

Cosa è un evento?

È un messaggio tramite il quale il sistema comunica che è accaduto qualcosa

[ tipicamente in un command handler ]

[ event ]

[ event bus ]

[ subscriber 1 ] [ subscriber 2 ]

composer require simple-bus/symfony-bridge

@command_bus@event_bus

Let’s code!

A wave of command buses by Matthias Nobackhttp://php-and-symfony.matthiasnoback.nl/2015/01/a-wave-of-command-buses/

SimpleBus Library http://simplebus.github.io/MessageBus/

Martin Eckardt Bachelor Thesis on CQRS and Event Sourcinghttps://drive.google.com/file/d/0B_enB2DMKeyzbF96VjdKdjIzOHc/view

Links

Ticket Office Sample Projecthttps://github.com/magobaol/ticket-office