Results 260 comments of webDEVILopers

Here is a more complex example for merging contracts. ```php final class ServiceContract extends AggregateRoot { public function mergeWith(array $mergeWithContractIds, array $enteredContracts): void { Assert::minCount($mergeWithContractIds, 2); /** @var Details $contractsToMerge...

Thanks for your feedback @dgafka . We prefer to create our read models asynch and run the projections as long-running processes. I added approach **3**. We load the read model...

Actually `MergedEmploymentContract` is NOT an aggregate root. It's just a factory using the typical `recordThat` method of prooph which indeed is include in the `AggregateRoot` class. But that one is...

Some details of the examples are inconsistent e.g. the doc block should hint to the primitive values. Please ignore.

I get your point. But I would not regard this a "duplication". Each layer has its own validation. We have command DTOs inside the `Application` layer. Sometimes some "aggregate-spanning" validation...

Possibly related: > In practice, it is often simpler to allow a degree of duplication rather than to strive for complete consistency. @eulerfx * http://gorodinski.com/blog/2012/05/19/validation-in-domain-driven-design-ddd/ Or in the comments section...

Similar question by @cer: > Another #eventstorming question: Read Models are typically depicted as being consumed by humans. But arguably a command triggered by, for example, a policy needs a...

Thoughts @prolic ? @matthiasnoback maybe? This reminds me of your example in chapter "3.4. Using value objects with internal read models" of your new book "Web application architecture": * https://leanpub.com/web-application-architecture...

Interesting read by @heynickc : > When we replay these events to reconstitute the state of an Aggregate, if the Value Object has a new invariant that makes the Event...