Course of DDD in PHP

Rafa GómezJavier Ferrer

By Rafa Gómez y Javier Ferrer Software Design and Architecture

Step by step create your PHP application following Domain-Driven Design. Folder structure, database integration, queuing system, CQRS, and more.

💸 First lesson available without registration!

Complete course on building PHP applications following the tactical and strategic patterns of DDD

What we will cover in this Domain-Driven Design course in PHP

  • [Free] 📖 Project creation: Bounded Context and Submodules - Folder structure
    • 🎥 Welcome to the course: Objectives, what will you learn?
    • 🎥 Folder structure: DDD in PHP
  • 📖 Application health check: Our first endpoint
    • 🎥 Create health check endpoint
    • 🎥 Dependency injection container: Controller as a service
    • 🎥 Adding acceptance tests with Behat
  • 📖 Outside-in development: Implementing the use case for creating a course
    • 🎥 Implementing the endpoint and acceptance test
    • 🎥 Integrate PhpUnit for unit tests
    • 🎥 Implementing the use case and unit test
    • 🎥 Implementing the file-based repository and integration test
  • 📖 Domain modeling: Course aggregate
    • 🎥 Using Request and Response objects to communicate with the Application Service
    • 🎥 Refactoring to UUIDs as identifiers
    • 🎥 Value Objects: Immutability and tips to speed up development
  • 📖 Domain modeling: Implications in tests
    • 🎥 ObjectMother pattern for our tests
    • 🎥 More semantic tests
  • 📖 Storing in a database with Doctrine
    • 🎥 Integrating Doctrine
    • 🎥 Mapping models in Doctrine: Custom Types vs Embeddables
    • 🎥 Implementing the repository for MySQL and integration test
    • 🎥 Discriminator Map with Hibernate
  • 📖 Alternative: Repositories with Active Record - Eloquent
    • 🎥 Integrating Eloquent and differences between Active Record and Data Mapper
    • 🎥 DDD in Laravel: Hiding Eloquent in infrastructure
  • 📖 Synchronous domain events with Symfony Messenger: Incrementing the total courses count
    • 🎥 Integrating Symfony Messenger and adapter interface EventBus
    • 🎥 Publishing and subscribing to domain events and acceptance test
    • 🎥 Idempotency in event consumption: Implementing the use case and unit test
  • 📖 “Partial” testing: PhpUnit SimilarComparator
    • 🎥 Adding Mockery
    • 🎥 Testing repository storage with domain events in the aggregate
    • 🎥 Alternative: Publishing events from aggregates
  • 📖 Asynchronous domain events - MySQL
    • 🎥 Storing domain events in MySQL
    • 🎥 Consuming domain events from MySQL
    • 🎥 Database polling to retrieve events
  • 📖 Publishing scalable asynchronous domain events using RabbitMQ
    • 🎥 Publishing events to RabbitMQ from PHP
    • 🎥 Adding a fallback for publishing domain events
  • 📖 Consuming events with RabbitMQ
    • 🎥 Automatically generating RabbitMQ configuration
    • 🎥 Consuming events from RabbitMQ in PHP
    • 🎥 Supervisord and PHP tips
    • 🎥 Error handling when consuming with RabbitMQ
  • 📖 CQRS
    • 🎥 Integrating Symfony Messenger as Command Bus
    • 🎥 Refactoring by adding CQRS to Hexagonal Architecture
    • 🎥 Integration and refactor to Query Bus
  • 📖 Bounded Contexts and modules
    • 🎥 Creating a Notifications module
    • 🎥 Promoting Notifications Module to Retention Bounded Context
  • 📖 Web Frontend
    • 🎥 Setting up a new application: Backoffice Frontend
    • 🎥 Integration with Twig
    • 🎥 Displaying course count via query from Controller
    • 🎥 Creating a course: Where to place command validations
  • 📖 Backoffice
    • 🎥 Course listing: Maintaining course projection
    • 🎥 Filtering elements: Criteria/Specification pattern
  • 📖 Performance optimization in Read Model - Moving to NoSQL: Elasticsearch to the rescue
    • 🎥 First data import to Elasticsearch
    • 🎥 Keeping Elasticsearch projection synchronized
    • 🎥 Criteria/Specification pattern with Elasticsearch
  • 📖 Performance optimization - Beyond Elasticsearch: MySQL optimizations, web caching, and more
  • 📖 Authorization
  • 📖 Frequently Asked Questions
  • 📖 Conclusion and next steps

Videos of the course

Related courses

See full catalogue

Pay according to your needs

lite (only monthly)

19 €
per month
  • Access to a subset of courses to lay the foundation for maintainable, scalable, and testable code
  • Company invoice
Popular

standard

24,92 €
Save 121
Annual payment of 299
per month
  • Full course catalog
  • Design and architecture challenges
  • Highlighted solutions videos for challenges
  • Receive job offers verified by Codely
  • Company invoice

premium

41,58 €
Save 89
Annual payment of 499
per month
  • Everything above
  • More benefits coming soon

We won’t increase the price while your subscription is active