Domain-Driven Design with Java - A Practitioner's Guide: Create simple, elegant, and valuable software solutions for complex business problems (Paperback)

Chandrasekaran, Premanand, Krishnan, Karthik



Adopt a practical and modern approach to architecting and implementing DDD-inspired solutions to transform abstract business ideas into working software across the entire spectrum of the software development life cycle

Key Features

- Implement DDD principles to build simple, effective, and well-factored solutions
- Use lightweight modeling techniques to arrive at a common collective understanding of the problem domain
- Decompose monolithic applications into loosely coupled, distributed components using modern design patterns

Book Description

Domain-Driven Design (DDD) makes available a set of techniques and patterns that enable domain experts, architects, and developers to work together to decompose complex business problems into a set of well-factored, collaborating, and loosely coupled subsystems.

This practical guide will help you as a developer and architect to put your knowledge to work in order to create elegant software designs that are enjoyable to work with and easy to reason about. You'll begin with an introduction to the concepts of domain-driven design and discover various ways to apply them in real-world scenarios. You'll also appreciate how DDD is extremely relevant when creating cloud native solutions that employ modern techniques such as event-driven microservices and fine-grained architectures. As you advance through the chapters, you'll get acquainted with core DDD's strategic design concepts such as the ubiquitous language, context maps, bounded contexts, and tactical design elements like aggregates and domain models and events. You'll understand how to apply modern, lightweight modeling techniques such as business value canvas, Wardley mapping, domain storytelling, and event storming, while also learning how to test-drive the system to create solutions that exhibit high degrees of internal quality.

By the end of this software design book, you'll be able to architect, design, and implement robust, resilient, and performant distributed software solutions.

What you will learn

- Discover how to develop a shared understanding of the problem domain
- Establish a clear demarcation between core and peripheral systems
- Identify how to evolve and decompose complex systems into well-factored components
- Apply elaboration techniques like domain storytelling and event storming
- Implement EDA, CQRS, event sourcing, and much more
- Design an ecosystem of cohesive, loosely coupled, and distributed microservices
- Test-drive the implementation of an event-driven system in Java
- Grasp how non-functional requirements influence bounded context decompositions

Who this book is for

This book is for intermediate Java programmers looking to upgrade their software engineering skills and adopt a collaborative and structured approach to designing complex software systems. Specifically, the book will assist senior developers and hands-on architects to gain a deeper understanding of domain-driven design and implement it in their organization. Familiarity with DDD techniques is not a prerequisite; however, working knowledge of Java is expected.


採用實用和現代的方法來架構和實施受 DDD 啟發的解決方案,將抽象的業務理念轉化為整個軟體開發生命週期中的可運作軟體。

- 實施 DDD 原則以建立簡單、有效和良好結構的解決方案
- 使用輕量級建模技術來達成對問題領域的共同理解
- 使用現代設計模式將龐大的應用程式拆分為鬆散耦合的分散元件


這本實用指南將幫助您作為開發人員和架構師,將您的知識應用於創建優雅的軟體設計,這些設計易於使用且易於理解。您將從領域驅動設計的概念入門,並發現在實際情境中應用它們的各種方法。您還將了解到,在創建使用事件驅動的微服務和細粒度架構等現代技術的雲原生解決方案時,DDD是非常相關的。隨著您進一步閱讀,您將熟悉核心 DDD 的戰略設計概念,如普遍語言、上下文地圖、有界上下文,以及聚合和領域模型和事件等戰術設計元素。您將了解如何應用現代輕量級建模技術,如業務價值畫布、Wardley 地圖、領域故事和事件風暴,同時學習如何測試驅動系統,以創建具有高度內部品質的解決方案。


- 發現如何對問題領域進行共同理解
- 建立核心和周邊系統之間的明確劃分
- 辨識如何演進和拆分複雜系統為良好結構的元件
- 應用領域故事和事件風暴等詳細技術
- 實施事件驅動架構(EDA)、命令查詢責任分離(CQRS)、事件溯源等等
- 設計一個具有內聚性、鬆散耦合和分散式微服務生態系統
- 在 Java 中測試驅動事件驅動系統的實現
- 理解非功能性需求如何影響有界上下文的拆分

本書適合對 Java 有一定經驗的中級程式設計師,他們希望提升軟體工程技能,並採用協作和結構化的方法來設計複雜的軟體系統。雖然不需要熟悉 DDD 技術,但需要具備 Java 的工作知識。


Premanand Chandrasekaran is a technology leader and change agent, with a solid track record of leading large technology teams and helping businesses deliver mission-critical problems while exhibiting high internal and external quality. In the past two decades, he has had the pleasure of helping a variety of clients and domains, including financial services, online retailers, education, and healthcare startups. His specialties include technical innovation, architecture, continuous delivery, agile/iterative transformation, and employee development. When not fiddling with his trusty laptop, he spends time cutting vegetables, cooking, playing video games, and analyzing the nuances of the game of cricket.

Karthik Krishnan is a technology leader with over 25 years of experience in designing and building large-scale enterprise solutions across financial and retail domains. He has played numerous technical roles in leading product development for major financial institutions. He is currently serving the role of Technical Principal at Thoughtworks. He is passionate about platform thinking, solution architecture, application security and strives to be known as a coding architect. His most recent assignment entailed leading a large technology team helping their clients in their legacy modernization journey with Cloud. When not working, he spends time practicing playing tunes on his musical keyboard.


Premanand Chandrasekaran是一位技術領導者和變革推動者,擁有領導大型技術團隊並幫助企業交付關鍵任務的豐富經驗,同時展現出高內部和外部品質。在過去的二十年中,他樂於幫助各種客戶和領域,包括金融服務、網上零售、教育和醫療保健初創企業。他的專長包括技術創新、架構、持續交付、敏捷/迭代轉型和員工發展。當他不忙於使用他可靠的筆記本電腦時,他會花時間切割蔬菜、烹飪、玩視頻遊戲和分析板球比賽的細微差別。

Karthik Krishnan是一位技術領導者,擁有超過25年的經驗,在金融和零售領域設計和構建大型企業解決方案。他在主要金融機構的產品開發中擔任過多個技術角色。他目前擔任Thoughtworks的技術負責人。他對平台思維、解決方案架構、應用安全性充滿熱情,並努力成為一位以編碼為基礎的架構師。他最近的任務是領導一個大型技術團隊,幫助客戶在雲端中進行遺留系統現代化的旅程。當他不工作時,他會花時間練習在他的音樂鍵盤上演奏曲子。


1. The Rationale for Domain-Driven Design
2. The Mechanics of Domain-Driven Design
3. Where and How Does DDD Fit?
4. Domain Analysis and Modeling Using EventStorming
5. Implementing Domain Logic
6. Implementing the User Interface - Task-Based
7. Implementing Queries
8. Implementing Long-Running Flows
9. Integrating with External Systems
10. Beginning the decomposition journey
11. Decomposing into finer-grained components
12. Beyond Functional Requirements


1. 領域驅動設計的理念
2. 領域驅動設計的機制
3. 領域驅動設計的適用範圍和方式
4. 使用 EventStorming 進行領域分析和建模
5. 實現領域邏輯
6. 實現使用者介面 - 基於任務的方式
7. 實現查詢
8. 實現長時間執行的流程
9. 與外部系統整合
10. 開始分解之旅
11. 分解成更細粒度的組件
12. 超越功能需求