"Practicing Domain-Driven Design through Examples" is a detailed practical book on DDD that helps understand the strategic and tactical design of complex software systems. The material is written in a clear language and is built around a realistic case in mortgage lending, so the reader not only sees the theory of Domain-Driven Design but also its application in real business scenarios.
About This Book
The book is dedicated to the practical application of Domain-Driven Design in developing complex corporate applications. The author demonstrates how to find domain boundaries, establish communication with the business, design models, and link architectural decisions to the actual needs of the product.
Special attention is given to how developers, architects, analysts, and business representatives can speak a common language. The concept of Ubiquitous Language—a common language for the team and domain experts—is analyzed in detail.
Key Topics of the Book
- Fundamentals of Domain-Driven Design: DDD principles, the role of the domain and business logic in design.
- Working with Experts: methods for discovering knowledge, clarifying requirements, and forming a common model.
- Strategic Design: subdomains, bounded contexts, context maps, and model boundaries.
- DDD Tactical Patterns: Entity, Value Object, Aggregate, Domain Event, Service, Factory, and Repository.
- Architectural Approaches: hexagonal architecture, "onion" architecture, and the connection of DDD with microservices.
- Practical Implementation: a sample case development using Java and Spring Boot.
Practical Approach on a Realistic Case
The main value of the book is the large number of examples and exercises. Instead of abstract explanations, the reader goes through a complex business case related to mortgage lending. This approach helps to understand how DDD is applied in projects with many rules, constraints, roles, processes, and interacting systems.
Throughout the book, it is examined how to gradually refine the domain model, highlight significant business events, find context boundaries, and translate expert knowledge into architectural and programmatic solutions.
Knowledge Work Methods
Separate sections are devoted to techniques that help the team gain deeper understanding of the domain and establish effective interaction with the business.
Event Storming
The book illustrates how to use Event Storming to investigate business processes through domain events. This approach helps quickly identify key actions, participants, rules, and problem areas in the system.
Domain Storytelling
Domain Storytelling is considered as a way to visually describe business processes through participant stories. This method helps to make the complex domain understandable for developers, analysts, and experts.
User Story Mapping and Example Mapping
User Story Mapping and Example Mapping are also analyzed—techniques that help structure requirements, identify important scenarios, and turn discussions with the business into specific user stories and system behavior examples.
Strategic Domain-Driven Design
The book thoroughly explains strategic DDD: how to analyze the domain, identify subdomains, and determine where the model boundaries should be.
- Domain and Subdomains: how to distinguish between core domain, supporting subdomain, and generic subdomain.
- Bounded Context: how to determine the model's applicability area and avoid mixing different meanings.
- Context Map: how to describe relationships between systems, teams, and models.
- DDD and Microservices: how bounded contexts help design service boundaries.
Practical examples help understand why microservices should not be designed solely around technical layers or database tables. Instead, the book demonstrates how to connect architectural boundaries with real business logic.
Tactical Design and DDD Patterns
The book thoroughly examines key tactical design patterns that help express business logic in code and make the model more understandable, resilient, and maintainable.
Main Patterns
- Entity: an object with identity and a lifecycle.
- Value Object: an immutable object describing a value without its own identity.
- Aggregate: a boundary of consistency and change management in the model.
- Domain Event: an event reflecting a significant fact in the domain.
- Domain Service: a service for business operations that do not belong to a single entity or value object.
- Factory: a pattern for creating complex domain objects.
- Repository: a way to work with saving and retrieving aggregates without polluting the domain model with infrastructural code.
Application Architecture with DDD
The material is not limited to modeling. The book also discusses architectural approaches that help isolate the domain model from technical details and make the application more flexible.
- Hexagonal Architecture: separation of domain logic, ports, adapters, and external dependencies.
- Onion Architecture: building an application around the domain core.
- Connection with Clean Architecture: principles of dependency on internal layers and protection of business logic.
- Integration with Microservices: using DDD for designing independent services and team boundaries.
Connection of DDD with Agile, DevOps, and Continuous Delivery
The book shows that Domain-Driven Design is not only a set of code patterns but also an approach to organizing development. DDD is well-suited with Agile as it helps constantly refine the model through feedback from experts and users.
The connection with Continuous Delivery and DevOps is also considered: well-defined contexts and autonomous models simplify the delivery of changes, reduce team coupling, and help develop the product faster.
Implementation with Java and Spring Boot
A separate part of the book is dedicated to implementing the described case using Java and Spring Boot. This is especially useful for developers who want to see how DDD ideas transform into project structure, classes, services, repositories, and layers interaction of the application.
The practical implementation helps connect theoretical concepts with real code and understand what decisions should be made when designing corporate Java applications.
Who Will Benefit from this Book
- Java developers who want to design more expressive and maintainable domain models.
- Backend developers working with complex business logic and microservice architecture.
- Software Architects and Tech Leads who need to define system, service, and team boundaries.
- System and Business Analysts involved in researching the domain and forming requirements.
- Product Owners and Development Managers who want to improve interaction between the business and the technical team.
What You Will Gain After Studying
- An understanding of the principles of Domain-Driven Design and its role in developing complex systems.
- Skills in identifying subdomains, bounded contexts, and context maps.
- The ability to apply Event Storming, Domain Storytelling, User Story Mapping, and Example Mapping.
- Knowledge of DDD tactical patterns and understanding of when to use them.
- An understanding of the connection of DDD with microservices, Agile, DevOps, and Continuous Delivery.
- A practical example of domain model implementation using Java and Spring Boot.
Why You Should Study "Practicing Domain-Driven Design through Examples"
This book is suitable for those who want not just to familiarize themselves with DDD terminology, but to learn how to apply Domain-Driven Design in real projects. It combines strategic modeling, tactical patterns, work with business experts, and practical implementation in Java.
"Practicing Domain-Driven Design through Examples" helps transition from chaotic business logic and scattered requirements to an understandable model, clear boundaries of responsibility, and domain-oriented architecture.