Einführung in Domain-Driven Design: Von der Strategie bis zum technischen Design

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Hands-On DDD: von der Strategie bis zum technischen Design

  • Anspruchsvolles Thema, von einem DDD-Praktiker gut lesbar aufgeschlüsselt und klar auf die strukturierte DDD-Denkweise und deren zentralen Prinzipien fokussiert
  • Konkrete Hilfestellungen, wann Patterns genutzt werden sollten und wann nicht
  • Kompakte Codebeispiele – gerade vollständig genug, um Grundideen zu vermitteln

Softwareentwicklung ist heutzutage anspruchsvoller denn je: Als Entwicklerin oder Entwickler müssen Sie technologische Trends im Blick behalten, aber genauso die Business Domains hinter der Software verstehen.

Dieser Praxisratgeber beschreibt zentrale Patterns, Prinzipien und Praktiken, mit denen Sie Geschäftsbereiche analysieren, die Business-Strategie verstehen und, was am wichtigsten ist, Ihr Softwaredesign besser an den Geschäftsanforderungen ausrichten können.

DDD-Praktiker Vlad Khononov zeigt Ihnen, wie diese Praktiken zu einer robusten Implementierung der Geschäftslogik führen und Ihr Softwaredesign und Ihre Softwarearchitektur zukunftsfähig machen. Abschließend wird DDD in Verbindung mit Microservices-basierten, Event-getriebenen und Data-Mesh-Architekturen beleuchtet.

Author(s): Vladislav Khononov
Edition: 1
Publisher: dpunkt
Year: 2022

Language: German
Pages: 342
City: Heidelberg, DE
Tags: Microservices; Heuristics; Software Architecture; Business Processes; Business Model; Event-Driven Architecture; Software Architecture Patterns; Domain-Driven Design; Domain Modeling; Business Logic; Data Mesh

Copyright
Table of Contents
Foreword
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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 6. Tackling Complex Business Logic
History
Domain Model
Implementation
Building Blocks
Managing Complexity
Conclusion
Exercises
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Appendix A. Applying DDD: A Case Study
Five Bounded Contexts
Business Domain
Bounded Context #1: Marketing
Bounded Context #2: CRM
Bounded Context #3: Event Crunchers
Bounded Context #4: Bonuses
Bounded Context #5: The Marketing Hub
Discussion
Ubiquitous Language
Subdomains
Boundaries of Bounded Contexts
Conclusion
Appendix B. Answers to Exercise Questions
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Bibliography
Index
About the Author
Colophon