Skip to content
  • Sign In
  • Try Now
View all events

Domain-driven design and event-driven microservices

Published by O'Reilly Media, Inc.

Intermediate to advanced content levelIntermediate to advanced

Learning a pathway to evolutionary architecture

New architectural paradigms like microservices and evolutionary architecture, along with the challenges associated with managing data and transactional contexts in distributed systems, have generated a renewed interest in disciplined software design and modular decomposition strategies. The secret to obtaining the benefits of these architectures is getting the boundaries right, at both the team and the component and service levels, and then keeping them right as the software continues to evolve. This allows you to create a unified and ubiquitous language within the bounded contexts those boundaries enclose, facilitating productive and coherent conversations between the business and engineering sides of your organization.

Fortunately, there's a mature, battle-tested approach to domain modeling and system decomposition that is a perfect complement to these architectures: domain-driven design (DDD). Join expert Matt Stine to learn how to leverage DDD-based decomposition strategies, data architecture patterns, and implementations as you explore an exemplar business domain—a pizza delivery store.

What you’ll learn and how you can apply it

By the end of this live online course, you’ll understand:

  • Why DDD is an effective tool for designing evolutionary architectures
  • DDD basic concepts
  • The importance of the ubiquitous language
  • How DDD can be effectively combined with multiple technical architectures

And you’ll be able to:

  • Leverage event storming to arrive at a candidate domain model
  • Translate an event storm into user stories
  • Effectively apply DDD patterns such as bounded context, aggregate, and domain event to design modules that can be evolved into event-driven microservices
  • Effectively leverage hexagonal architecture to implement modules that can be evolved into event-driven microservices

This live event is for you because...

  • You're a software developer who wants to apply best practices for implementing microservice architectures.
  • You're a solutions architect who wants to apply best practices for designing microservice architectures.
  • You're a data engineer or architect who wants to apply best practices for supporting microservice architectures.


  • Basic familiarity with domain-driven design concepts, technical architecture concepts, and test-driven development
  • A working knowledge of Java and automated testing libraries (e.g., JUnit, Mockito, and AssertJ)
  • A basic understanding of Git and GitHub
  • Experience building or designing medium to large-scale enterprise applications (useful but not required)

Materials or downloads needed in advance:

  • A machine with Java 11, a recent version of Maven, Git, and the IDE/editor of your choice installed (make sure you also have the Lombok plug-in installed)
  • A GitHub account
  • A free Miro account (useful but not required; alternatively, use the presentation or diagramming tool of your choice

Assignments to be completed prior to the course:

Download the course materials and complete the setup instructions found on the course GitHub repository (info to come)

Recommended preparation:


The time frames are only estimates and may vary according to how the class is progressing.


Introduction (10 minutes)

Domain-driven design (15 minutes)

  • Lecture: What is DDD, and why do we need it?

Ubiquitous language (25 minutes)

  • Lecture: What is ubiquitous language, and why is it so important?
  • Q&A and group discussion: Why use DDD and ubiquitous language?
  • Break (10 minutes)

DDD 101: Strategic design (35 minutes)

  • Lecture: Bounded contexts; context mapping; subdomains
  • Q&A and group discussion: Strategic design
  • Break (10 minutes)

DDD 101: Tactical design (35 minutes)

  • Lecture: Aggregates, entities, value objects, domain events, application services, domain services (25 minutes)
  • Q&A and group discussion: Tactical design

Event storming (15 minutes)

  • Lecture: Overview of event storming
  • Break (10 minutes)

Pizza Shop event storming activity (55 minutes)

  • Interactive screen share: Introduction to the Pizza Shop domain
  • Q&A and group discussion: Event storming and the Pizza Shop domain
  • Hands-on exercise: Using the Pizza Shop domain, identify domain events, commands, actors, and aggregates using your whiteboard/diagram tool of choice
  • Interactive screen share: Pizza Shop event storming solution

From event storming to domain-driven design (20 minutes)

  • Lecture: How Event Storm concepts translate into DDD concepts, user stories, and TDD code
  • Q&A and group discussion: Day 1 AMA


Day 1 recap (10 minutes)

DDD and technical architectures (25 minutes)

  • Lecture: DDD and technical architectures

Introduction to the Pizza Shop coding exercises (10 minutes)

  • Interactive screen share: Overview of the Pizza Shop coding exercise environment
  • Break (10 minutes)

Exercise 1: TDD aggregate root (25 minutes)

  • Hands-on exercise: Create kitchen commands with business logic and invariants
  • Interactive screen share: Solution

Exercise 2: TDD aggregate root (25 minutes)

  • Hands-on exercise: Create and publish kitchen domain events
  • Interactive screen share: Solution
  • Break (10 minutes)

Exercise 3: TDD aggregate repository (25 minutes)

  • Hands-on exercise: Create kitchen repositories and add domain events
  • Interactive screen share: Solution

Exercise 4: TDD aggregate repository (25 minutes)

  • Hands-on exercise: Rehydrate kitchen aggregates by reference
  • Interactive screen share: Solution

Exercise 5: TDD application service (25 minutes)

  • Hands-on exercise: Expose kitchen business interface and implement transactions
  • Interactive screen share: Solution
  • Break (10 minutes)

Exercise 6: TDD policy (25 minutes)

  • Hands-on exercise: Subscribe to a kitchen domain event from within an aggregate and create a CQRS view
  • Interactive screen share: Solution

Exercise 7: TDD policy (25 minutes)

  • Hands-on exercise: Subscribe to a kitchen domain event from an adjacent aggregate and update state
  • Interactive screen share: Solution
  • Wrap-up and Q&A (10 minutes)

Your Instructor

  • Matt Stine

    Matt Stine is a 22-year veteran of the enterprise IT industry, with seven of those years spent as a consulting solutions architect for multiple Fortune 500 companies, as well as the not-for-profit St. Jude Children’s Research Hospital. He is the author of Migrating to Cloud-Native Application Architectures from O’Reilly, and the host of the Software Architecture Radio podcast.

    Matt spends much of his time thinking about lean/agile software development methodologies, DevOps, architectural principles/patterns/practices, and programming paradigms, in an attempt to find the perfect storm of techniques that will allow corporate IT organizations to not only function like startup companies, but also create software that delights users while maintaining a high degree of conceptual integrity. He is currently a Senior Principal Software Engineer, in JPMorgan Chase’s Chief Technology Office.

    Matt has spoken at conferences ranging from JavaOne to OSCON to YOW!, was a ten-year member of the No Fluff Just Stuff tour, and previously served as Technical Editor of NFJS the Magazine. Matt was also the founder and president of the Memphis Java User Group.