Learning Domain–Driven Design
Aligning Software Architecture and Business Strategy
Paperback Engels 2021 9781098100131Samenvatting
Building software is harder than ever. As a developer, you not only have to chase ever-changing technological trends but also need to understand the business domains behind the software. This practical book provides you with a set of core patterns, principles, and practices for analyzing business domains, understanding business strategy, and, most importantly, aligning software design with its business needs.
Author Vlad Khononov shows you how these practices lead to robust implementation of business logic and help to future-proof software design and architecture. You'll examine the relationship between domain-driven design (DDD) and other methodologies to ensure you make architectural decisions that meet business requirements. You'll also explore the real-life story of implementing DDD in a startup company.
With this book, you'll learn how to:
- Analyze a company's business domain to learn how the system you're building fits its competitive strategy
- Use DDD's strategic and tactical tools to architect effective software solutions that address business needs
- Build a shared understanding of the business domains you encounter
- Decompose a system into bounded contexts
- Coordinate the work of multiple teams
- Gradually introduce DDD to brownfield projects
Specificaties
Lezersrecensies
Inhoudsopgave
Preface
Why I Wrote This Book
Who Should Read This Book
Navigating the Book
Example Domain: WolfDesk
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Introduction
Part I. Strategic Design
1. Analyzing Business Domains
What Is a Business Domain?
What Is a Subdomain?
Types of Subdomains
Comparing Subdomains
Identifying Subdomain Boundaries
Domain Analysis Examples
Gigmaster
BusVNext
Who Are the Domain Experts?
Conclusion
Exercises
2. Discovering Domain Knowledge
Business Problems
Knowledge Discovery
Communication
What Is a Ubiquitous Language?
Language of the Business
Scenarios
Consistency
Model of the Business Domain
What Is a Model?
Effective Modeling
Modeling the Business Domain
Continuous Effort
Tools
Challenges
Conclusion
Exercises
3. Managing Domain Complexity
Inconsistent Models
What Is a Bounded Context?
Model Boundaries
Ubiquitous Language Refined
Scope of a Bounded Context
Bounded Contexts Versus Subdomains
Subdomains
Bounded Contexts
The Interplay Between Subdomains and Bounded Contexts
Boundaries
Physical Boundaries
Ownership Boundaries
Bounded Contexts in Real Life
Semantic Domains
Science
Buying a Refrigerator
Conclusion
Exercises
4. Integrating Bounded Contexts
Cooperation
Partnership
Shared Kernel
Customer–Supplier
Conformist
Anticorruption Layer
Open-Host Service
Separate Ways
Communication Issues
Generic Subdomains
Model Differences
Context Map
Maintenance
Limitations
Conclusion
Exercises
Part II. Tactical Design
5. Implementing Simple Business Logic
Transaction Script
Implementation
It’s Not That Easy!
When to Use Transaction Script
Active Record
Implementation
When to Use Active Record
Be Pragmatic
Conclusion
Exercises
6. Tackling Complex Business Logic
History
Domain Model
Implementation
Building Blocks
Managing Complexity
Conclusion
Exercises
7. Modeling the Dimension of Time
Event Sourcing
Search
Analysis
Source of Truth
Event Store
Event-Sourced Domain Model
Advantages
Disadvantages
Frequently Asked Questions
Performance
Deleting Data
Why Can’t I Just…?
Conclusion
Exercises
8. Architectural Patterns
Business Logic Versus Architectural Patterns
Layered Architecture
Presentation Layer
Business Logic Layer
Data Access Layer
Communication Between Layers
Variation
When to Use Layered Architecture
Ports & Adapters
Terminology
Dependency Inversion Principle
Integration of Infrastructural Components
Variants
When to Use Ports & Adapters
Command-Query Responsibility Segregation
Polyglot Modeling
Implementation
Projecting Read Models
Challenges
Model Segregation
When to Use CQRS
Scope
Conclusion
Exercises
9. Communication Patterns
Model Translation
Stateless Model Translation
Stateful Model Translation
Integrating Aggregates
Outbox
Saga
Process Manager
Conclusion
Exercises
Part III. Applying Domain-Driven Design in Practice
10. Design Heuristics
Heuristic
Bounded Contexts
Business Logic Implementation Patterns
Architectural Patterns
Testing Strategy
Testing Pyramid
Testing Diamond
Reversed Testing Pyramid
Tactical Design Decision Tree
Conclusion
Exercises
11. Evolving Design Decisions
Changes in Domains
Core to Generic
Generic to Core
Supporting to Generic
Supporting to Core
Core to Supporting
Generic to Supporting
Strategic Design Concerns
Tactical Design Concerns
Transaction Script to Active Record
Active Record to Domain Model
Domain Model to Event-Sourced Domain Model
Generating Past Transitions
Modeling Migration Events
Organizational Changes
Partnership to Customer–Supplier
Customer–Supplier to Separate Ways
Domain Knowledge
Growth
Subdomains
Bounded Contexts
Aggregates
Conclusion
Exercises
12. EventStorming
What Is EventStorming?
Who Should Participate in EventStorming?
What Do You Need for EventStorming?
The EventStorming Process
Step 1: Unstructured Exploration
Step 2: Timelines
Step 3: Pain Points
Step 4: Pivotal Events
Step 5: Commands
Step 6: Policies
Step 7: Read Models
Step 8: External Systems
Step 9: Aggregates
Step 10: Bounded Contexts
Variants
When to Use EventStorming
Facilitation Tips
Watch the Dynamics
Remote EventStorming
Conclusion
Exercises
13. Domain-Driven Design in the Real World
Strategic Analysis
Understand the Business Domain
Explore the Current Design
Modernization Strategy
Strategic Modernization
Tactical Modernization
Cultivate a Ubiquitous Language
Pragmatic Domain-Driven Design
Selling Domain-Driven Design
Undercover Domain-Driven Design
Conclusion
Exercises
Part IV. Relationships to Other Methodologies and Patterns
14. Microservices
What Is a Service?
What Is a Microservice?
Method as a Service: Perfect Microservices?
Design Goal
System Complexity
Microservices as Deep Services
Microservices as Deep Modules
Domain-Driven Design and Microservices’ Boundaries
Bounded Contexts
Aggregates
Subdomains
Compressing Microservices’ Public Interfaces
Open-Host Service
Anticorruption Layer
Conclusion
Exercises
15. Event-Driven Architecture
Event-Driven Architecture
Events
Events, Commands, and Messages
Structure
Types of Events
Designing Event-Driven Integration
Distributed Big Ball of Mud
Temporal Coupling
Functional Coupling
Implementation Coupling
Refactoring the Event-Driven Integration
Event-Driven Design Heuristics
Conclusion
Exercises
16. Data Mesh
Analytical Data Model Versus Transactional Data Model
Fact Table
Dimension Table
Analytical Models
Analytical Data Management Platforms
Data Warehouse
Data Lake
Challenges of Data Warehouse and Data Lake Architectures
Data Mesh
Decompose Data Around Domains
Data as a Product
Enable Autonomy
Build an Ecosystem
Combining Data Mesh and Domain-Driven Design
Conclusion
Exercises
Closing Words
Problem
Solution
Implementation
Further Reading
Advanced Domain-Driven Design
Architectural and Integration Patterns
Modernization of Legacy Systems
EventStorming
Conclusion
A. Applying DDD: A Case Study
B. Answers to Exercise Questions
References
Index
Rubrieken
- Advisering
- Algemeen management
- Coaching en trainen
- Communicatie en media
- Economie
- Financieel management
- Inkoop en logistiek
- Internet en social media
- IT-management / ICT
- Juridisch
- Leiderschap
- Marketing
- Mens en maatschappij
- Non-profit
- Ondernemen
- Organisatiekunde
- Personal finance
- Personeelsmanagement
- Persoonlijke effectiviteit
- Projectmanagement
- Psychologie
- Reclame en verkoop
- Strategisch management
- Verandermanagement
- Werk en loopbaan