Learning Domain-Driven Design: Aligning Software Architecture and Business Strategy
Book information
Description
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 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
Similar books
Einführung in Domain-Driven Design: Von der Strategie bis zum technischen Design
2022 · EPUB
Balancing Coupling in Software Design: Universal Design Principles for Architecting Modular Software Systems (for True Epub)
2025 · EPUB
Learning Domain-Driven Design: Aligning Software Architecture and Business Strategy
2021 · EPUB
Learning Domain-Driven Design: Aligning Software Architecture and Business Strategy
2021 · EPUB
Learning Domain-Driven Design
2021 · EPUB
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF