更新时间:2021-07-02 22:11:30
coverpage
Title Page
Credits
Foreword
About the Authors
Acknowledgments
www.PacktPub.com
Why subscribe?
Customer Feedback
Dedication
Preface
Who Should Read This Book
DDD and PHP Community
Summary of Chapters
Chapter 1: Getting Started with Domain-Driven Design
Chapter 2: Architectural Styles
Chapter 3: Value Objects
Chapter 4: Entities
Chapter 5: Domain Services
Chapter 6: Domain-Events
Chapter 7: Modules
Chapter 8: Aggregates
Chapter 9: Factories
Chapter 10: Repositories
Chapter 11: Application
Chapter 12: Integrating Bounded Contexts
Appendix: Hexagonal Architecture with PHP
Code and Examples
Getting Started with Domain-Driven Design
Why Domain-Driven Design Matters
The Three Pillars of Domain-Driven Design
Ubiquitous Language
Event Storming
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
Model-View-Controller
Example of Layered Architecture
The View
The Controller
Inverting Dependencies: Hexagonal Architecture
The Dependency Inversion Principle (DIP)
Applying Hexagonal Architecture
Command Query Responsibility Segregation (CQRS)
The Write Model
The Read Model
Synchronizing the Write Model with the Read Model
Event Sourcing
Value Objects
Definition
Value Object vs. Entity
Currency and Money Example
Characteristics
Measures Quantifies or Describes
Immutability
Conceptual Whole
Value Equality
Replaceability
Side-Effect-Free Behavior
Basic Types
Testing Value Objects
Persisting Value Objects
Persisting Single Value Objects
Embedded Value with an Ad Hoc ORM
Embedded Value (Embeddables) with Doctrine >= 2.5.*
Embedded Value with Doctrine <= 2.4.*
Serialized LOB and Ad Hoc ORM
Improved Serialization with JMS Serializer
Serialized LOB with Doctrine
Doctrine Object Mapping Type
Doctrine Custom Types
Persisting a Collection of Value Objects
Collection Serialized into a Single Column
Collection Backed by a Join Table
Collection Backed by a Join Table with Doctrine
Collection Backed by a Join Table with an Ad Hoc ORM
Collection Backed by a Database Entity
NoSQL
PostgreSQL JSONB and MySQL JSON Type
Security
Entities
Introduction
Objects Vs. Primitive Types
Identity Operation
Persistence Mechanism Generates Identity
Surrogate Identity
Active Record Vs. Data Mapper for Rich Domain Models
Client Provides Identity
Application Generates Identity
Other Bounded Context Generates Identity
Persisting Entities
Setting Up Doctrine
Mapping Entities