thenativeweb / cqrs-sample

CQRS, EventSourcing, (DDDD) Sample in node.js
148 stars 50 forks source link

'head.revision' vs 'revision' #11

Open TomKaltz opened 9 years ago

TomKaltz commented 9 years ago

Can you explain why not use just 'revision' for domain and command structure?

adrai commented 9 years ago

you can define it like you want to...

TomKaltz commented 9 years ago

These fields are optional and do not get stored if they aren't specified. I'm curious to why there isn't a conventional default for command and event structure. Some of those optional values seem pretty important. Seems like it complicates the system more to require such configuration?

TomKaltz commented 9 years ago

Just like #12. The aggregate name is pretty important but is not stored if not specified in config. Conventional defaults sound like the way to go. What do you think @adrai ?

adrai commented 9 years ago

revision => no, because depending on that the internal revisionGuard is triggered aggregate.name => no, because the minimal message structure has only an aggregateId and no aggregateName and no contextName

adrai commented 9 years ago

PS. I reverted the pull req