webDEVILopers
webDEVILopers
At the bottom line what we devs do is offering other devs a single-point-of-entrance via command handler and a factory (method) to create the aggregate. But we don't have to...
What about `date`s? Should they be passed as `ImmutableDateTime` objects or as primitive strings? What do you think @matthiasnoback?
Agree! But do you even handle dates as strings instead of DateTimeImmutable?
Thanks for your opinion! Currently I'm using `DateTime` objects in my DTO. But I will switch to a string `yyyy-mm-dd` transfer. For now most of my commands are populated by...
> Even though I'm often not _actually_ serializing DTO's, I like them to be very flat, since that's in the spirit of a DTO. Any type of object would not...
Another advantage of moving the validation of creating object to the Handler would be the improvement of catching errors in a single place e.g.: https://github.com/webdevilopers/php-ddd/issues/4
That is exactly the approach I would like to use @matthiasnoback in the future. Besides the validation it will also make it easier to work with my team since some...
We are currently decoupling our UI from our (mostly Symfony w/ Forms) applications. Now we no longer separate between a "CommandDTO" and the actual "Domain Command". The latter is sometimes...
Here is an excerpt of the constructor transforming the data of the Domain (WRITE) Model data into the READ model: ```php public static function fromBundle(Inspection $bundle) { $faults = [];...
Another thought: Should I move the data transformation for the Event to an `Assembler` to return the Event as a DTO?