event based modelling and prototyping
TRANSCRIPT
![Page 1: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/1.jpg)
2017-04-07T09:30
E V E N T B A S E D
M O D E L L I N G
P R O T O T Y P I N G
&
![Page 2: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/2.jpg)
Andrea Gian Maria Alessandro
![Page 3: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/3.jpg)
![Page 4: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/4.jpg)
Artigiani del software
![Page 5: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/5.jpg)
![Page 6: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/6.jpg)
FAIL FAST
![Page 7: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/7.jpg)
![Page 8: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/8.jpg)
Prenotazione attrezzature
![Page 9: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/9.jpg)
![Page 10: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/10.jpg)
![Page 11: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/11.jpg)
![Page 12: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/12.jpg)
![Page 13: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/13.jpg)
![Page 14: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/14.jpg)
“Nothing surprises me; I’m a scientist.”
![Page 15: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/15.jpg)
ResourceTypes ResourcesUsers Reservations
4 Tabelle
![Page 16: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/16.jpg)
Tabelle? Non è DDD!
![Page 17: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/17.jpg)
ResourceTypes ResourcesUsers Reservations
4 Tabelle
![Page 18: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/18.jpg)
ResourceType ResourceUser Reservation
4 Aggregati
![Page 19: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/19.jpg)
![Page 20: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/20.jpg)
ResourceType ResourceUser Reservation
4 Aggregati
![Page 21: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/21.jpg)
ResourceType
Resource
User
Reservation
Aggregati
Value Objects
+
![Page 22: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/22.jpg)
![Page 23: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/23.jpg)
“Non l’abbiamo evidenziato perché è
scontato che il software lo faccia”
![Page 24: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/24.jpg)
“Dobbiamo fare un sistema migliore del precedente, con più
funzionalità”
![Page 25: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/25.jpg)
Statistiche utente / risorsa / tipologia
L’auto è in officina
Il PC non è configurato
Alla fine di una riunione la sala deve essere pulita prima di essere nuovamente disponibile
Gli utenti prenotano le attrezzature disponibili……e il nostro ufficio decide a chi darle.
Un utente può annullare una prenotazione……ma noi dobbiamo confermare l’annullamento.
Alcune richieste hanno precedenza su altre
La berlina è riservata al C.D.A.
Storico delle prenotazioni
Notifiche ad ogni evento
![Page 26: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/26.jpg)
Aggiungiamo un flag
![Page 27: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/27.jpg)
Storicizziamo il dato
![Page 28: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/28.jpg)
Gestiamo l’eccezione
![Page 29: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/29.jpg)
Iniettiamo un servizio…
![Page 30: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/30.jpg)
![Page 31: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/31.jpg)
“FIRST, SOLVE THE PROBLEMTHEN WRITE THE CODE”
John Johnson
![Page 32: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/32.jpg)
is the most important part of the strategy.
ITERATION
It needs to be very, very fast and always based on learning.
![Page 33: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/33.jpg)
ALWAYS KEEP LEARNING
You stop doing useful things if you
don't learn.Satya Nadella
![Page 34: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/34.jpg)
Problem Model Code
![Page 35: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/35.jpg)
Problem
Intent Action Reaction
![Page 36: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/36.jpg)
EVENT EVENT EVENT EVENT
Timeline
INTENT
DECISION SUPPORT
REACTIONEVENT EVENT
NOTIFICATION
Problem Space
![Page 37: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/37.jpg)
EVENT EVENT EVENT EVENT
Stream
COMMAND
READ MODEL
PROCESSEVENT EVENT
SUBSCRIPTION
Solution Space
![Page 38: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/38.jpg)
EVENT EVENT EVENT EVENT
Stream
COMMAND
READ MODEL
PROCESSEVENT EVENT
SUBSCRIPTION
EVENT EVENT EVENT EVENT
Timeline
INTENT
DECISION SUPPORT
REACTIONEVENT EVENT
NOTIFICATION
Problem Space
Solution Space
![Page 39: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/39.jpg)
PROBLEM
![Page 40: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/40.jpg)
![Page 41: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/41.jpg)
![Page 42: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/42.jpg)
is a workshop format for
Event Storming
quickly exploring complex business domains
![Page 43: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/43.jpg)
Il tempo scorre in questa direzione
![Page 44: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/44.jpg)
Un pennarello a testa
![Page 45: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/45.jpg)
Start!
![Page 46: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/46.jpg)
Goal + KPI Goal + KPI Goal + KPI
![Page 47: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/47.jpg)
Event
![Page 48: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/48.jpg)
Rappresenta qualcosa di significativo accaduto nel
dominio.
Event
![Page 49: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/49.jpg)
RichiestaApprovata
![Page 50: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/50.jpg)
Attacchiamo i primi eventi disponendoli sull’asse temporale
RichiestaApprovata
RichiestaConfermata
RichiestaRespinta
![Page 51: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/51.jpg)
Command
![Page 52: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/52.jpg)
Indica l’intento dell’utente
Command
![Page 53: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/53.jpg)
ApprovaRichiesta
![Page 54: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/54.jpg)
Associamo ad ogni evento il comando relativo.
ApprovaRichiesta
![Page 55: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/55.jpg)
![Page 56: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/56.jpg)
Read Model
![Page 57: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/57.jpg)
Rappresenta il supporto decisionale per l’utente
Read Model
![Page 58: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/58.jpg)
Lista delle attrezzature disponibili
![Page 59: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/59.jpg)
Il readmodel aiuta ad identificare le informazioni necessarie all’utente per prendere decisioni
Lista delle attrezzature disponibili
![Page 60: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/60.jpg)
Ubiquitous language
![Page 61: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/61.jpg)
Definisce con precisione il significato di ogni termine
Ubiquitous language
![Page 62: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/62.jpg)
Attrezzatura Bene materiale
oggetto di prenotazione
![Page 63: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/63.jpg)
Attrezzatura Bene materiale oggetto di
prenotazione
ambiguitàconvergenza sul significato dei termini
![Page 64: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/64.jpg)
Problema smontato!
![Page 65: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/65.jpg)
is a workshop format for
Event Storming
quickly exploring complex business domains
non compila!!!
![Page 66: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/66.jpg)
MODEL
![Page 67: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/67.jpg)
DOMAIN DRIVEN DESIGN
![Page 68: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/68.jpg)
Un Domain Model non rappresenta la realtà, la sua rappresentazione è funzionale esclusivamente al caso d’uso.
https://www.theguardian.com/news/datablog/gallery/2013/jan/09/london-underground-alternative-tube-maps
![Page 69: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/69.jpg)
![Page 70: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/70.jpg)
ENTITYRisorsa_1
Registrata
Abilitata
Prenotata
Consegnata
Resa
Bloccata
Dismessa
Risorsa_2Registrata
Abilitata
Prenotata
Consegnata
Resa
Bloccata
Dismessa
![Page 71: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/71.jpg)
VALUE OBJECT{ “Descrizione” : “Notebook”, “Ram” : “16gb” }
{ “Descrizione” : “Notebook”, “Ram” : “16gb” }
{ “Descrizione” : “Tablet”, “Colore” : “Space Gray” }
{ “Descrizione” : “Tablet”, “Colore” : “Total Black” }
{ “Descrizione” : “Notebook”, “Ram” : “16gb”, “Matricola” : “MB1039” }
{ “Descrizione” : “Notebook”, “Ram” : “16gb”, “Matricola” : “MB1040” }
![Page 72: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/72.jpg)
AGGREGATE ROOTEntity
Entity
Entity
Entity
Entity
Rule
Rule
Rule
value object
value object
value object
value object
![Page 73: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/73.jpg)
FACTORY
![Page 74: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/74.jpg)
REPOSITORY
![Page 75: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/75.jpg)
Event Sourcing
![Page 76: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/76.jpg)
“Capture all changes to an application state as a sequence of events.”
Event Sourcing
http://martinfowler.com/eaaDev/EventSourcing.html
TimeRisorsa Censita
Risorsa resa
disponibile
Prenotazione Inserita
Prenotazione Approvata
Prenotazione Inserita
Prenotazione Confermata
Prenotazione Non
Approvata
Risorsa Dismessa
![Page 77: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/77.jpg)
Risorsa Censita
Risorsa resa
disponibile
Prenotazione Inserita
Prenotazione Approvata
Prenotazione Inserita
Prenotazione Confermata
Prenotazione Non
Approvata
Risorsa Dismessa
Risorsa_1 Prenotazione_1 Prenotazione_2
![Page 78: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/78.jpg)
Title : ”Budget 2014 - IT”, LastModified : “2013-09-15”, Tags : [],Author: “Board of Directors”,PublishedBy: null, File: “Budget.xlsx”
Who: “Mr. Smith”, Why: “DocumentCreated”,When: “2013-09-15 18:35”, What:{ Title : ”Budget 2014 - IT”, Author: “Board of Directors”, File: “Budget.xlsx” }
Who: “Mary J.”, Why: “RevisionAdded”,When: “2013-09-16 09:40”, What: { File: “Budget with Costs.xlsx” }
Who: “Mary J.”, Why: “DocumentTagged”,When: “2013-09-16 09:40”, What: { Tags : [“Draft”, “Accounting”] }
Who: “Luther Blissett”, Why: “RevisionAdded”,When: “2013-12-06 21:35”, What: { File: “Budget with Costs & Sales Forecast.xlsx”}
Who: “Luther Blissett”, Why: “DocumentTagged”,When: “2013-12-06 21:35”, What: { Tags : [“Budget”,”Sales”,“Accounting”] }
Who: “Jane Doe”, Why: “DocumentPublished”,When: “2014-01-05 23:17”, What : { Title : “Budget 2014” Tags : [“Budget”,”Sales”,“Accounting”] }
TIME
Title : ”Budget 2014”, LastModified : “2014-01-05”, Tags : [“Budget”, “Sales”, “Accounting”],Author: “Board of Directors”,PublishedBy: “Jane Doe”, File: “Budget with Costs & Sales Forecast.xlsx”
Title : ”Budget 2014 - IT”, LastModified : “2013-09-16”, Tags : [“Draft”, “Accounting”],Author: “Board of Directors”,PublishedBy: null, File: “Budget with Costs.xlsx”
Title : ”Budget 2014 - IT”, LastModified : “2013-12-06”, Tags : [“Budget”,”Sales”,“Accounting”],Author: “Board of Directors”,PublishedBy: null, File: “Budget with Costs & Sales Forecast.xlsx”
Information Loss
![Page 79: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/79.jpg)
15 Settembre
2013
16 Settembre
2013
12 Dicembre
2013
5 Gennaio
2014
6 Maggio
2014
![Page 80: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/80.jpg)
CQRS
![Page 81: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/81.jpg)
CQRS“At its heart is a simple notion that you can use a
different model to update information than the model you use to read information”
http://martinfowler.com/bliki/CQRS.html
![Page 82: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/82.jpg)
Business Logic
Decision support system
![Page 83: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/83.jpg)
![Page 84: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/84.jpg)
Business Logic
Decision support system
![Page 85: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/85.jpg)
Business Logic
Decision support system
![Page 86: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/86.jpg)
Query
Command
![Page 87: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/87.jpg)
join the dots…
![Page 88: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/88.jpg)
Query
Command
Read Model
Domain Model
![Page 89: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/89.jpg)
Command
Read Model
Query
Domain Model
![Page 90: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/90.jpg)
Read Model
Domain Model
![Page 91: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/91.jpg)
Read Model
Application StateAggregate
Command
Event Event
Event
![Page 92: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/92.jpg)
Read Model
Application StateAggregate
Command Event Event
Event
![Page 93: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/93.jpg)
Read Model
EventstreamAggregate
Projection
Command
Event Event
EventEvent
![Page 94: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/94.jpg)
Read Model
EventstreamAggregate
Projection
Command
Event Event
EventEvent
Query
DDD+CQRS+ES
![Page 95: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/95.jpg)
EVENT EVENT EVENT EVENT EVENT
Timeline
COMMAND
READ MODEL
Action Mutation
PROCESS
Reaction
EVENT EVENT EVENT
Write Read
SUBSCRIPTION
![Page 96: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/96.jpg)
MODELLATHON
![Page 97: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/97.jpg)
Defrag
![Page 98: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/98.jpg)
Aggreghiamo i post-it
Defrag
![Page 99: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/99.jpg)
![Page 100: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/100.jpg)
Aggregato Aggregato
Bounded Context
Aggregato
Bounded Context
![Page 101: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/101.jpg)
Invarianti
![Page 102: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/102.jpg)
Sono le regole che non possiamo violare
Invarianti
![Page 103: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/103.jpg)
Non sono ammesse prenotazioni sovrapposte per singola attrezzatura.
![Page 104: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/104.jpg)
Aggregato Aggregato
Bounded Context
Aggregato
Bounded Context
Non sono ammesse prenotazioni sovrapposte per singola attrezzatura.
![Page 105: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/105.jpg)
Transizioni
![Page 106: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/106.jpg)
Esploriamo le relazioni tra comandi ed eventi
Transizioni
![Page 107: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/107.jpg)
Aggregato Aggregato
Bounded Context
Aggregato
Bounded Context
![Page 108: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/108.jpg)
Aggregato
![Page 109: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/109.jpg)
![Page 110: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/110.jpg)
if()
![Page 111: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/111.jpg)
if()
![Page 112: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/112.jpg)
Processmanager
![Page 113: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/113.jpg)
Rappresenta un processo di business complesso
Processmanager
![Page 114: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/114.jpg)
Assegnazione attrezzatura
![Page 115: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/115.jpg)
Assegnazione attrezzatura
![Page 116: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/116.jpg)
Command Query Responsibility Segregation
Command
Process Manager
Event
Event
Aggregate
Projections
Read Model
Read Model
![Page 117: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/117.jpg)
Assegnazione attrezzatura
![Page 118: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/118.jpg)
CODE
![Page 119: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/119.jpg)
![Page 120: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/120.jpg)
Assegnazione attrezzatura
Lista delle attrezzature disponibili
ApprovaRichiesta
RichiestaApprovata
Non sono ammesse prenotazioni sovrapposte per singola attrezzatura.
![Page 121: Event based modelling and prototyping](https://reader031.vdocument.in/reader031/viewer/2022021921/58f088541a28ab9f088b4627/html5/thumbnails/121.jpg)
AssegnazioneAttrezzature
(process)
AttrezzatureDisponibili
(model)
ApprovaRichiesta
(command)
RichiestaApprovata
(event)
VietaPrenotazioniSovrapposte
(business rule)