Skip to Content
Domain-Driven Design in PHP
book

Domain-Driven Design in PHP

by Keyvan Akbary, Carlos Buenosvinos, Christian Soronellas
June 2017
Intermediate to advanced
394 pages
8h 52m
English
Packt Publishing
Content preview from Domain-Driven Design in PHP

Small Aggregates Vs. Big Aggregates

For most of the websites and projects where we've worked, almost 95 percent of Aggregates were formed by one single root Entity and some Value Objects. No other Entities were required to be in the same Aggregate. So in most cases, there was no real true business invariant to keep consistent.

Be careful with the has-a/has-many relations that don't necessarily make two Entities become one Aggregate, with one of those being the root. Relations, as we will see, can be handled by referencing Entity Identities.

As explained in the introduction, an Aggregate is a transactional boundary. The smaller the boundary is, the fewer chances there are for conflicts when committing multiple concurrent transactions. When ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP Web Services

PHP Web Services

Lorna Jane Mitchell
PHP Microservices

PHP Microservices

Pablo Solar Vilariño, Carlos Pérez Sánchez

Publisher Resources

ISBN: 9781787284944