From cca407d9187580855b0e0417e9fca9ca014bcd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Barbeito=20Garc=C3=ADa?= Date: Mon, 6 Apr 2020 22:45:32 +0200 Subject: [PATCH 1/2] Add book: Domain-Driven Design in PHP --- books/{.gitkeep => domain-driven-design-in-php.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename books/{.gitkeep => domain-driven-design-in-php.md} (100%) diff --git a/books/.gitkeep b/books/domain-driven-design-in-php.md similarity index 100% rename from books/.gitkeep rename to books/domain-driven-design-in-php.md From bc894e7f587b46b063bcc2f8afd6b0505504cabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Barbeito=20Garc=C3=ADa?= Date: Thu, 16 Apr 2020 19:05:24 +0200 Subject: [PATCH 2/2] Update the book index of content --- books/domain-driven-design-in-php.md | 455 +++++++++++++++++++++++++++ 1 file changed, 455 insertions(+) diff --git a/books/domain-driven-design-in-php.md b/books/domain-driven-design-in-php.md index e69de29..8220b6f 100644 --- a/books/domain-driven-design-in-php.md +++ b/books/domain-driven-design-in-php.md @@ -0,0 +1,455 @@ +# Domain-Driven Design in PHP + +------ + +by Carlos Buenosvinos, Christian Soronellas, and Keyvan Akbary + +> Discover DDD, Architectural Styles, Tactical Design Implementations, and Bounded Context Integration with PHP 7.4 examples +> +> Master Domain-Driven Design Tactical patterns: Entities, Value Objects, Services, Domain Events, Aggregates, Factories, Repositories and Application Services; with real examples in PHP. Explore the advantages of Hexagonal Architecture and understand Strategic design with Bounded Contexts and their integration through REST and message queues. + +* [Leanpub](https://leanpub.com/ddd-in-php) +* [Goodreads](https://www.goodreads.com/book/show/26032410-domain-driven-design-in-php) +* [Github](https://github.com/dddinphp) + +------ + +## Preface + +* + +## Getting Started with Domain-Driven Design + +### Why Domain-Driven Design Matters + +* + +### The Three Pillars of Domain-Driven Design + +* + +### Considering Domain-Driven Design + +* + +### The Tricky Parts + +* + +### Strategical Overview + +* + +### Related Movements: Microservices and Self-Contained Systems + +* + +### Wrap-Up + +## Architectural Styles + +* + +### The Good Old Days + +* + +### Layered Architecture + +* + +### Inverting Dependencies: Hexagonal Architecture + +* + +### Command Query Responsibility Segregation (CQRS) + +* + +### Event Sourcing + +* + +### Wrap-Up + +* + +## Value Objects + +* + +### Definition + +* + +### Value Object vs. Entity + +* + +### Currency and Money Example + +* + +### Characteristics + +* + +### Basic Types + +* + +### Testing Value Objects + +* + +### Persisting Value Objects + +* + +### Security + +* + +### Wrap-Up + +* + +## Entities + +### Introduction + +* + +### Objects vs. Primitive Types + +* + +### Identity Operation + +* + +### Persisting Entities + +* + +### Testing Entities + +* + +### Validation + +* + +### Entities and Domain Events + +* + +### Wrap-Up + +* + +## Services + +### Application Services + +* + +### Domain Services + +* + +### Domain Services and Infrastructure Services + +* + +### Testing Domain Services + +* + +### Anemic Domain Models vs. Rich Domain Models + +* + +### Wrap-Up + +## Domain Events + +### Introduction + +* + +### Definition + +* + +### Characteristics + +* + +### Modeling Events + +* + +### Doctrine Events + +* + +### Persisting Domain Events + +* + +### Publishing Events from the Domain Model + +* + +### Spreading the News to Remote Bounded Contexts + +* + +### Wrap-Up + +* + +## Modules + +### General Overview + +* + +### Leverage Modules in PHP + +* + +### Bounded Contexts and Applications + +* + +### Structuring Code in Modules + +* + +### Wrap-Up + +* + +## Aggregates + +### Introduction + +* + +### Key Concepts + +* + +### What Is an Aggregate? + +* + +### Why Aggregates? + +* + +### A Bit of History + +* + +### Anatomy of an Aggregate + +* + +### Aggregate Design Rules + +* + +### Sample Application Service: User and Wishes + +* + +### Transactions + +* + +### Wrap Up + +* + +## Factories + +### Factory Method on Aggregate Root + +* + +### Factory on Service + +* + +### Testing Factories + +* + +### Wrap-Up + +* + +## Repositories + +### Definition + +* + +### Repositories Are Not DAOs + +* + +### Collection-Oriented Repositories + +* + +### Persistence-Oriented Repository + +* + +### Extra Behavior + +* + +### Querying Repositories + +* + +### Managing Transactions + +* + +### Testing Repositories + +* + +### Testing Your Services with In-Memory Implementations + +* + +### Wrap-Up + +* + +## Application + +### Requests + +* + +### Anatomy of an Application Service + +* + +### Testing Application Services + +* + +### Transactions + +* + +### Security + +* + +### Domain Events + +* + +### Command Handlers + +* + +### Wrap-Up + +## Integrating Bounded Contexts + +### Integration Through the Data Store + +* + +### Integration Relationships + +* + +### Implementing Bounded Context Integrations + +* + +### Wrap-Up + +* + +## The End and bibliography + +* + +## Appendix: Hexagonal Architecture with PHP + +### Introduction + +* + +### First Approach + +* + +### Repositories and the Persistence Edge + +* + +### Decoupling Business and Persistence + +* + +### Migrating our Persistence to Redis + +* + +### Decouple Business and Web Framework + +* + +### Rating an idea using the API + +* + +### Console app rating + +* + +### Testing Rating an Idea UseCase + +* + +### Testing Infrastructure + +* + +### Arggg, So Many Dependencies! + +* + +### Domain Services and Notification Hexagon Edge + +* + +### Let’s Recap + +* + +### Hexagonal Architecture + +* + +### Key Points + +* + +### What’s Next? + +*