Book Chapters

38 chapters organized into 9 parts, taking you from DDD fundamentals to advanced patterns and AI integration.

Part I: Introduction

  • 01 Why DDD? The Pragmatic Approach
  • 02 The Three Pillars
  • 03 DDD and Laravel: A Natural Fit
  • 04 When to Use DDD

Part II: Building Blocks

  • 05 Project Structure
  • 06 Entities
  • 07 Value Objects
  • 08 Aggregates
  • 09 Domain Services
  • 10 Domain Events

Part III: Application Layer

  • 11 Commands and Command Handlers
  • 12 Queries and Query Handlers
  • 13 DTOs and View Models
  • 14 Application Services

Part IV: Infrastructure Layer

  • 15 Repositories
  • 16 Domain Controller Pattern
  • 17 Event Dispatching
  • 18 External Service Integration
  • 19 Caching Strategies

Part V: Testing

  • 20 Unit Testing the Domain
  • 21 Integration Testing
  • 22 Testing CQRS
  • 23 Test Doubles and Fakes

Part VI: Bounded Contexts

  • 24 Understanding Bounded Contexts
  • 25 Context Mapping
  • 26 Integrating External Systems

Part VII: Advanced Patterns

  • 27 Event Sourcing Introduction
  • 28 Event Store Implementation
  • 29 CQRS Deep Dive
  • 30 Read Model Projections

Part VIII: Real-World Applications

  • 31 Legacy Migration Strategies
  • 32 External APIs and ACL
  • 33 Performance Considerations
  • 34 Error Handling Patterns

Part IX: AI and DDD

  • 35 AI-Assisted Development
  • 36 Structuring Code for AI
  • 37 AI Coding Patterns
  • 38 The Future of DDD

Appendices

  • A DDD Principles Checklist
  • B Implementation Checklist
  • C Folder Structure Reference
  • D Further Reading