Skip to main content

2 posts tagged with "architecture"

View All Tags

Building a Domain-Driven Design Architecture with BowPHP

· 6 min read
Franck DAKIA
Principal maintainer

BowPHP ships with a clean MVC layout, but nothing stops you from organising a larger application around Domain-Driven Design (DDD). The framework already gives you the three pieces DDD leans on: a container to bind interfaces to implementations, CQRS to model use-cases, and an event system to publish domain events. In this post we'll wire them together into a layered, testable architecture.

We'll model a single bounded context — Ordering — and keep the domain at the centre, framework details at the edges.

Splitting Orders and Billing with BowPHP Microservices

· 4 min read
Franck DAKIA
Principal maintainer

As an application grows, some responsibilities want to live on their own — their own deploy cadence, their own scaling, their own team. Billing is a classic example. In this post we'll extract billing into a separate service and have our Orders application talk to it using the bowphp/microservice package over Redis.

We'll use both communication modes the package offers:

  • Request/Response (RPC) with send() — when Orders needs an answer back.
  • Fire-and-forget (Event) with emit() — when Orders just wants to announce that something happened.