Domain-Driven Design And Microservices Explained with Examples
Domain-Driven Design And Microservices Explained with Examples
Learn to clarify and focus the boundaries of your system’s architecture
About the Book
Have you been finding it difficult to model the boundaries of your system’s microservices? Have you been slowed down by the technical complexity of your codebase? Has your team been stepping on each other’s toes? If your answers to any of these questions are yes, then applying Domain Driven Design to your microservices is likely to be useful to your team.
One of the difficult choices in microservices architecture is coming up with boundaries and deciding whether a particular piece of code should be turned into a microservice. Technical teams often make this decision without taking a business perspective on what really makes sense. Using DDD the boundaries for microservices are better designed by bringing both technical and business teams together to achieve the project’s goals.
This book takes key concepts from DDD and applies them to microservices architecture. Using an example business domain, and end-to-end code examples, you’ll learn to design and implement microservices using DDD. You’ll also understand DDD’s relationships to data mesh, team topologies, and micro-frontends. Bring technical and business teams together and achieve your project’s goals.
The term Domain-Driven Design (DDD) was coined by Eric Evans in his seminal book, Domain-Driven Design: Tackling Complexity in the Heart of Software, published in 2003, and was well ahead of its time. In recent years, microservice architecture has gained a lot of attention as one of the most popular evolutionary architecture styles. DDD is an immensely useful tool for designing scalable systems/platforms and a solid basis for designing better microservices architecture. DDD is also useful for building distributed data architectures including data mesh, and for organizing a large team using team topologies.
The audience for this book is software architects, enterprise architects, engineering managers and software engineers working on larger scale software platforms, ecosystems, and enterprise applications. My assumption is that they have some programming experience in the software industry.
Domain-driven design and microservices are both extremely popular topics. DDD covers architecture, data architecture, the organization of large teams on platforms and ecosystems, and micro-frontends, so it is likely to become key knowledge for most individuals working in the software industry at some point in their career.
By the end of this book the reader will understand:
- The relationship between Domain Driven Design (DDD) and microservices.
- How DDD can help with microservices architecture.
- How to use tactical and strategic DDD patterns.
- Why the domain model is the primary and most important layer in layered/tiered and hexagonal architectures.
- How to design domain events, which are the basis for event-driven architecture.
- Modular monolith architecture and its relation to DDD.
- Different types of Architectures - CQRS, Event Sourcing, Event Driven Architecture.
- How data mesh and team topologies are related to DDD.
- How micro-frontends are related to DDD
And the reader will be able to:
- Understand different architecture choices for implementing Domain Models.
- Come up with a microservice using the Domain Driven Design Aggregate concept.
- Design and evolve better boundaries for microservices using DDD’s bounded context and ubiquitous language.
- Understand the Domain Layer and its importance in the overall success of the project.
- Apply DDD tactical patterns to existing codebases.
- Understand DDD strategic patterns like Ubiquitous language and Bounded Context.
- Understand the dynamics of the domain using Context maps describes relationships between bounded contexts.
- How to use Modular monolithic architecture in the context of Microservices or other architectures.
- Understand when you use CQRS, Event Sourcing, Event Driven Architecture.
- Using DDD in micro-frontends applications
Table of Contents
-
Introduction to Domain-Driven Design
- What is Domain Driven Design aka DDD
- Why use Domain Driven Design
- When to use Domain Driven Design
- DDD and Friends
- Basics of microservices
-
Domain Events - Understanding building blocks of DDD
- Use case 1
- Use case 2
- Use case 3
- Use case 4
- Use case 5
- DDD Concept 1 - Domain Event
-
Entity - Understanding building blocks of DDD
- Use case 6
- DDD Concept 2 - Entity
-
Value Object - Understanding building blocks of DDD
- Use case 7
- DDD Concept 3 - Value Object
- Is it value object or entity
-
Domain Service - Understanding building blocks of DDD
- Use case 8
- DDD Concept 3 - Domain Service
- Refactoring/Improving existing codebase or existing microservices
- Recap of what we covered so far
- What is Domain Layer / Domain Model
-
Understading Aggregates and relationship to microservices
- Use case 9
- Use case 10
- Aggregates
- Relationship to microservices
-
Splitting Aggregates
- Other scenarios in which Aggregates may be split
-
Bounded Contexts
- Use case 11
- Subdomains
- How Subdomain and Bounded Context Map to each other
- Bounded Context and team organization
- Bounded Context and its relation to microservices
- Team Topologies
- Ubiquitous Language
- Context Maps
- Modular Monoliths
- Event Sourcing
- CQRS
-
Finding Bounded Contexts
- Event Storming
- Domain Storytelling
- DDD and Relation to Data Mesh
- github code links
- References
- Microfrontends and DDD
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them