Results 260 comments of webDEVILopers

Why not take my example and prepare all those methods for a non-legacy scenario but calling them all in one handler - just like the setters you suggested. Then one...

But remember when refactoring your domain model later: keep your aggregates small. Maybe having too much data to change in an Entity should make you rethink your aggregate. As I...

Final note: Removing the setters and having good domain model will move you away from CRUD like style. Since you are talking about HTTP we are not talking about CRUD...

I think there was a similar example in the talk I linked previously @olivergierke: https://www.youtube.com/watch?v=1OgvUIsv96o Looks like a good attempt by @yuloh.

TLDR After having a short look at the discussion I'm wondering why I ever considered "setters" resp. using multiple setters when handling a single command. After some projects with Event...

The alternative approaches were using a Domain Service to ensure that the developer could not pass "incorrectly determined" entered contracts. **A+ES** ```php final class ServiceContract extends AggregateRoot { public static...

Yet another solution would be to go full event-driven. As @BrunoRommens suggests: > What are design implications with this ? Maybe one new aggregate "Available periods" providing a "Reserve period"...

Thanky you very much to @BrunoRommens who draw these diagrams to understand the suggested solutions: * https://twitter.com/BrunoRommens/status/1320073246667059205 ![1](https://user-images.githubusercontent.com/3479626/97155402-98f90080-1775-11eb-8df2-36b38af29a24.png) ![2a](https://user-images.githubusercontent.com/3479626/97155403-99919700-1775-11eb-93f1-4f3292ce5284.png) ![2b](https://user-images.githubusercontent.com/3479626/97155404-9a2a2d80-1775-11eb-960e-2383c52ed632.png) ![3a](https://user-images.githubusercontent.com/3479626/97155407-9ac2c400-1775-11eb-928c-2c2f673d8a40.png) ![3b](https://user-images.githubusercontent.com/3479626/97155409-9b5b5a80-1775-11eb-9c59-d3aad8df3a6a.png)

![4a](https://user-images.githubusercontent.com/3479626/97155410-9b5b5a80-1775-11eb-8038-047f80efc2fb.png) ![4b](https://user-images.githubusercontent.com/3479626/97155411-9c8c8780-1775-11eb-8aba-9eb3c4b1d438.png) > This 3rd solution is not exactly what I meant initialy. I think the "non overlaping contract assignment periods" rule deserves its own aggregate, because it only applies...

> I like the idea of making the AssignmentPeriodAvailability an AR. Didin't consider it at first b/c I thought there could be thousands or more taken periods, but that's less...