Engineering the Future of Software
Feb 3–4, 2019: Training
Feb 4–6, 2019: Tutorials & Conference
New York, NY
Please log in

Domain-driven design and event-driven microservices

Matt Stine (Pivotal)
Sunday, February 3 & Monday, February 4, 9:00am - 5:00pm
Location: Concourse A
Average rating: ****.
(4.67, 6 ratings)

Participants should plan to attend both days of this 2-day training course. Platinum and Training passes do not include access to tutorials on Monday.

Leveraging an exemplar business domain (a pizza delivery store), Matt Stine takes you through domain-driven design (DDD)-based decomposition strategies, data architecture patterns, and implementations.

What you'll learn, and how you can apply it

By the end of this two-day training course, you'll understand:

  • Why DDD is an effective tool for designing evolutionary architectures
  • The basic concepts of DDD
  • The importance of the ubiquitous language
  • How DDD can be effectively combined with multiple technical architectures
  • How pain points can be used to drive the evolution from a modular monolith to microservices
  • The trade-offs that must be negotiated with each major evolutionary change to an architecture

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
  • Apply stepwise refactorings to evolve from a modular monolith to component-based to service-based architectures
  • Apply automated fitness functions to ensure that architectural qualities are maintained throughout the architecture’s evolution


  • Basic familiarity with domain-driven design concepts can ease your understanding of the course material. If you need a refresher, read Domain-Driven Design Distilled by Vaughn Vernon.
  • We'll be leveraging multiple technical architecture concepts in this course. Vaughn Vernon provides a great overview of them in chapter 4 of Implementing Domain-Driven Design.
  • Understanding test-driven development is key to the programming exercises we’ll complete. Test-Driven Development: By Example is a classic treatment of these concepts. You may also find Growing Object-Oriented Software, Guided by Tests a nice contextual treatment of TDD, mock objects, and object-oriented design.
  • We'll use the Java programming language, as well as testing libraries such as JUnit, Mockito, and AssertJ. You should be comfortable with Java programming and automated testing libraries.
  • Familiarity with Git and GitHub will be required. If you need to brush up your Git(Hub) skills, this Complete Git and GitHub Masterclass is helpful.
  • We'll leverage Docker to run some services like databases and message queues. If you’re not familiar with Docker, this book can help you get started.

Hardware and/or installation requirements:

  • A machine with Java 8, Maven (recent), Git, Docker (recent), and the IDE/editor (with the Lombok plugin) installed (Instructions for Eclipse and IntelliJ are linked.)
  • A free Realtime Board account or the presentation/diagramming tool of your choice
  • A GitHub account
  • Download course materials from GitHub (TBD) and complete the setup instructions (The setup instructions will guide you in creating your course repository fork, cloning it, setting it up in your IDE, and running your first build. They will also help you validate your Docker environment.)

New architectural paradigms like microservices and evolutionary architecture, as well as 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. We know that the secret to obtaining the benefits of these architectures is getting the boundaries right, both at the team and the component/service level, and then keeping them right as the software continues to evolve. Fortunately, there is a mature, battle-tested approach to domain modeling and system decomposition that is a perfect complement to these architectures: domain-driven design (DDD).

Leveraging an exemplar business domain (a pizza delivery store), Matt Stine takes you through DDD-based decomposition strategies, data architecture patterns, and implementations.


Day 1:

  • Introduction
  • Lecture: Why do we need DDD?
  • Lecture: What is ubiquitous language, and why is it so important?
  • Q&A and class discussion: Why use DDD and ubiquitous language?
  • Lecture: DDD 101—Strategic design: Bounded contexts, context mapping, and subdomains
  • Q&A and class discussion: Strategic design
  • Lecture: DDD 101—Tactical design: Aggregates, entities, value objects, domain events, application services, and domain services
  • Q&A and class discussion: Tactical design
  • Lecture: Overview of event storming
  • Lecture: Introduction to the Pizza Shop domain
  • Q&A and class discussion: Event storming and Pizza Shop domain
  • Group exercise: Event storming kata
  • Lecture: How event storm concepts translate into DDD concepts, user stories, and TDD code
  • Lecture: DDD and technical architectures
  • Day 1 wrap-up and Q&A

Day 2:

  • Day 1 recap
  • Lecture: Intro to evolutionary architectures and fitness functions
  • Lecture: The app continuum
  • Lecture: Overview of the Pizza Shop coding exercise environment
  • Q&A and class discussion: Evolutionary architecture and the app continuum
  • Hands-on exercise: Lab 1—TDD aggregate root: Create kitchen commands with business logic and invariants
  • Lecture: Lab 1 solution
  • Hands-on exercise: Lab 2—TDD aggregate root: Create and publish kitchen domain events
  • Lecture: Lab 2 solution
  • Hands-on exercise: Lab 3—TDD aggregate repository: Create kitchen repositories and add domain events
  • Lecture: Lab 3 solution
  • Hands-on exercise: Lab 4—TDD aggregate repository: Rehydrate kitchen aggregates by reference
  • Lecture: Lab 4 solution
  • Hands-on exercise: Lab 5—TDD application service: Expose kitchen business interface and implement transactions
  • Lecture: Lab 5 solution
  • Hands-on exercise: Lab 6—TDD policy: Subscribe to a kitchen domain event from within an aggregate and create CQRS view
  • Lecture: Lab 6 solution
  • Hands-on exercise: Lab 7—TDD policy: Subscribe to a kitchen domain event from an adjacent aggregate and update state
  • Lecture: Lab 7 solution
  • Hands-on exercise: Lab 8—Evolutionary refactoring: Move from packages to components; externalize persistence
  • Lecture: Lab 8 solution
  • Hands-on exercise: Lab 9—Evolutionary refactoring: Move from components to microservices; externalize eventing
  • Lecture: Lab 9 solution
  • Wrap-up and Q&A

About your instructor

Photo of Matt Stine

Matt Stine is the global CTO for architecture at Pivotal, where he spends much of his time helping customers develop cloud native application architectures. Matt is an 18-year veteran of the enterprise IT industry, 8 of them spent as consulting solutions architect for multiple Fortune 500 companies and the not-for-profit St. Jude Children’s Research Hospital. He is the author of Migrating to Cloud-Native Application Architectures (O’Reilly) and the host of the Software Architecture Radio podcast. Matt is obsessed with the idea that enterprise IT doesn’t have to suck. He focuses on Lean/Agile software development methodologies; DevOps; architectural principles, patterns, and practices; and programming paradigms in an attempt to find the perfect storm of techniques that will allow corporate IT departments to function like startups and create software that delights users while maintaining a high degree of conceptual integrity. Matt has spoken at conferences ranging from JavaOne to OSCON to YOW! and is an eight-year member of the No Fluff Just Stuff tour. Matt is also the founder and past president of the Memphis Java User Group.

Twitter for mstine

Conference registration

Get the Platinum pass or the Training pass to add this course to your package.