
Getting Started with Domain-Driven Development
Description
Book Introduction
The easiest introduction to domain-driven design!
This book is for developers who are learning Domain-Driven Design (DDD) for the first time.
It is structured so that you can learn the core concepts of DDD and learn through implementation so that you can apply DDD to actual work.
This book will help you broaden your understanding of DDD by implementing applications using domain models.
This book is for developers who are learning Domain-Driven Design (DDD) for the first time.
It is structured so that you can learn the core concepts of DDD and learn through implementation so that you can apply DDD to actual work.
This book will help you broaden your understanding of DDD by implementing applications using domain models.
- You can preview some of the book's contents.
Preview
index
Chapter 1.
Getting Started with the Domain Model
1.1 What is a domain?
1.2 Knowledge sharing between domain experts and developers
1.3 Domain Model
1.4 Domain Model Pattern
1.5 Deriving a domain model
1.6 Entities and Values
1.6.1 Entities
1.6.2 Generating entity identifiers
1.6.3 Value Type
1.6.4 Entity Identifiers and Value Types
1.6.5 Do not include set methods in domain models
1.7 Domain Terminology and Ubiquitous Language
Chapter 2.
Architecture Overview
2.1 Four areas
2.2 Hierarchical Architecture
2.3 DIP
2.3.1 DIP Precautions
2.3.2 DIP and Architecture
2.4 Key Components of the Domain Area
2.4.1 Entities and Values
2.4.2 Aggregate
2.4.3 Repository
2.5 Request Processing Flow
2.6 Infrastructure Overview
2.7 Module Configuration
Chapter 3.
Aggregate
3.1 Aggregate
3.2 Aggregate Route
3.2.1 Domain Rules and Consistency
3.2.2 Implementing the Aggregate Root Function
3.2.3 Transaction Scope
3.3 Repositories and Aggregates
3.4 Aggregate References Using ID
3.4.1 Reference and query performance using ID
3.5 Aggregate-to-aggregate association
3.6 Using Aggregate as a Factory
Chapter 4.
Repository and model implementation (JPA-centric)
4.1 Implementing a repository using JPA
4.1.1 Module Location
4.1.2 Implementing basic repository functions
4.2 Implementing a Repository Using Spring Data JPA
4.3 Mapping Implementation
4.3.1 Implementing Basic Entity and Value Mapping
4.3.2 Default Constructor
4.3.3 Using the field approach
4.3.4 Value Mapping Processing Using AttributeConverter
4.3.5 Value Collection: Separate Table Mapping
4.3.6 Value Collection: Mapping a Single Column
4.3.7 ID Mapping Using Values
4.3.8 Value Mapping Stored in a Separate Table
4.3.9 Mapping a Value Collection to @Entity
4.3.10 Unidirectional MN Mapping Using ID References and Join Tables
4.4 Aggregate Loading Strategy
4.5 Aggregate Persistence Propagation
4.6 Identifier generation function
4.7 Domain Implementation and DIP
Chapter 5.
Query function using Spring Data JPA
5.1 Before you begin
5.2 Specifications for Search
5.3 Implementing the Specification Using Spring Data JPA
5.4 Using Specs in Repositories/DAOs
5.5 Spec combination
5.6 Specifying alignment
5.7 Handling Paging
5.8 Spec Builder Class for Spec Combination
5.9 Dynamic Instance Creation
5.10 Using Hibernate @Subselect
Chapter 6.
Application services and expression areas
6.1 Expression and Application Areas
6.2 Role of Application Services
6.2.1 Do not include domain logic
6.3 Implementation of application services
6.3.1 Size of application services
6.3.2 Application Service Interfaces and Classes
6.3.3 Method parameters and returning values
6.3.4 Not relying on expression domains
6.3.5 Transaction Processing
6.4 Expression Area
6.5 Value Validation
6.6 Permission Check
6.7 View-only features and application services
Chapter 7.
Domain services
7.1 Features that require multiple aggregates
7.2 Domain Services
7.2.1 Computational Logic and Domain Services
7.2.2 External System Integration and Domain Services
7.2.3 Package Location for Domain Services
7.2.4 Domain Service Interfaces and Classes
Chapter 8.
Aggregate Transaction Management
8.1 Aggregates and Transactions
8.2 Preemptive Lock
8.2.1 Preemptive Locking and Deadlocks
8.3 Non-preemptive locking
8.3.1 Forced version increase
8.4 Offline Preemptive Lock
8.4.1 LockManager interface and related classes for offline preemptive locking
8.4.2 Implementing LockManager using DB
Chapter 9.
Domain Model and Bounded Context
9.1 Domain Models and Boundaries
9.2 Bounded Context
9.3 Implementing Bounded Contexts
9.4 Integration across bounded contexts
9.5 Relationships between Bounded Contexts
9.6 Context Map
Chapter 10.
event
10.1 Tightly Coupling Problems Between Systems
10.2 Event Overview
10.2.1 Event-related components
10.2.2 Event Composition
10.2.3 Event Purpose
10.2.4 Event Benefits
10.3 Implementing Events, Handlers, and Dispatchers
10.3.1 Event Class
10.3.2 Events Class and ApplicationEventPublisher
10.3.3 Event Generation and Event Handlers
10.3.4 Flow Summary
10.4 Synchronous Event Handling Issues
10.5 Asynchronous Event Handling
10.5.1 Asynchronous execution of local handlers
10.5.2 Asynchronous implementation using a messaging system
10.5.3 Asynchronous processing using event storage
10.6 Additional Considerations When Applying Events
10.6.1 Considering Event Handling and DB Transactions
Chapter 11. CQRS
11.1 Disadvantages of a Single Model
11.2 CQRS
11.2.1 Web and CQRS
11.2.2 CQRS Pros and Cons
Getting Started with the Domain Model
1.1 What is a domain?
1.2 Knowledge sharing between domain experts and developers
1.3 Domain Model
1.4 Domain Model Pattern
1.5 Deriving a domain model
1.6 Entities and Values
1.6.1 Entities
1.6.2 Generating entity identifiers
1.6.3 Value Type
1.6.4 Entity Identifiers and Value Types
1.6.5 Do not include set methods in domain models
1.7 Domain Terminology and Ubiquitous Language
Chapter 2.
Architecture Overview
2.1 Four areas
2.2 Hierarchical Architecture
2.3 DIP
2.3.1 DIP Precautions
2.3.2 DIP and Architecture
2.4 Key Components of the Domain Area
2.4.1 Entities and Values
2.4.2 Aggregate
2.4.3 Repository
2.5 Request Processing Flow
2.6 Infrastructure Overview
2.7 Module Configuration
Chapter 3.
Aggregate
3.1 Aggregate
3.2 Aggregate Route
3.2.1 Domain Rules and Consistency
3.2.2 Implementing the Aggregate Root Function
3.2.3 Transaction Scope
3.3 Repositories and Aggregates
3.4 Aggregate References Using ID
3.4.1 Reference and query performance using ID
3.5 Aggregate-to-aggregate association
3.6 Using Aggregate as a Factory
Chapter 4.
Repository and model implementation (JPA-centric)
4.1 Implementing a repository using JPA
4.1.1 Module Location
4.1.2 Implementing basic repository functions
4.2 Implementing a Repository Using Spring Data JPA
4.3 Mapping Implementation
4.3.1 Implementing Basic Entity and Value Mapping
4.3.2 Default Constructor
4.3.3 Using the field approach
4.3.4 Value Mapping Processing Using AttributeConverter
4.3.5 Value Collection: Separate Table Mapping
4.3.6 Value Collection: Mapping a Single Column
4.3.7 ID Mapping Using Values
4.3.8 Value Mapping Stored in a Separate Table
4.3.9 Mapping a Value Collection to @Entity
4.3.10 Unidirectional MN Mapping Using ID References and Join Tables
4.4 Aggregate Loading Strategy
4.5 Aggregate Persistence Propagation
4.6 Identifier generation function
4.7 Domain Implementation and DIP
Chapter 5.
Query function using Spring Data JPA
5.1 Before you begin
5.2 Specifications for Search
5.3 Implementing the Specification Using Spring Data JPA
5.4 Using Specs in Repositories/DAOs
5.5 Spec combination
5.6 Specifying alignment
5.7 Handling Paging
5.8 Spec Builder Class for Spec Combination
5.9 Dynamic Instance Creation
5.10 Using Hibernate @Subselect
Chapter 6.
Application services and expression areas
6.1 Expression and Application Areas
6.2 Role of Application Services
6.2.1 Do not include domain logic
6.3 Implementation of application services
6.3.1 Size of application services
6.3.2 Application Service Interfaces and Classes
6.3.3 Method parameters and returning values
6.3.4 Not relying on expression domains
6.3.5 Transaction Processing
6.4 Expression Area
6.5 Value Validation
6.6 Permission Check
6.7 View-only features and application services
Chapter 7.
Domain services
7.1 Features that require multiple aggregates
7.2 Domain Services
7.2.1 Computational Logic and Domain Services
7.2.2 External System Integration and Domain Services
7.2.3 Package Location for Domain Services
7.2.4 Domain Service Interfaces and Classes
Chapter 8.
Aggregate Transaction Management
8.1 Aggregates and Transactions
8.2 Preemptive Lock
8.2.1 Preemptive Locking and Deadlocks
8.3 Non-preemptive locking
8.3.1 Forced version increase
8.4 Offline Preemptive Lock
8.4.1 LockManager interface and related classes for offline preemptive locking
8.4.2 Implementing LockManager using DB
Chapter 9.
Domain Model and Bounded Context
9.1 Domain Models and Boundaries
9.2 Bounded Context
9.3 Implementing Bounded Contexts
9.4 Integration across bounded contexts
9.5 Relationships between Bounded Contexts
9.6 Context Map
Chapter 10.
event
10.1 Tightly Coupling Problems Between Systems
10.2 Event Overview
10.2.1 Event-related components
10.2.2 Event Composition
10.2.3 Event Purpose
10.2.4 Event Benefits
10.3 Implementing Events, Handlers, and Dispatchers
10.3.1 Event Class
10.3.2 Events Class and ApplicationEventPublisher
10.3.3 Event Generation and Event Handlers
10.3.4 Flow Summary
10.4 Synchronous Event Handling Issues
10.5 Asynchronous Event Handling
10.5.1 Asynchronous execution of local handlers
10.5.2 Asynchronous implementation using a messaging system
10.5.3 Asynchronous processing using event storage
10.6 Additional Considerations When Applying Events
10.6.1 Considering Event Handling and DB Transactions
Chapter 11. CQRS
11.1 Disadvantages of a Single Model
11.2 CQRS
11.2.1 Web and CQRS
11.2.2 CQRS Pros and Cons
Detailed image

Publisher's Review
This book covers the content required to implement applications using domain models and consists of 11 chapters.
Contents of this book
Chapters 1 and 2 cover the basics you need to know when implementing a domain model.
In Chapter 1, we will learn what a domain model is and explore entities and values.
Chapter 2 describes the four domains of architecture and the DIP pattern at a high level and looks at the components of the domain area.
Chapters 3 through 5 explain aggregates and repositories.
Aggregators are responsible for grouping complex domain models into manageable units.
In Chapter 3, we will learn what an aggregate is and how to implement it.
In Chapter 4, we will learn how to implement a repository, which is a logical storage for aggregates, and in Chapter 5, we will implement search functions such as specifications for search conditions, sorting, and paging.
Chapter 6 describes the application services and expression areas.
We will explore how application services use the domain model and what role they play, and explain the integration between the presentation domain and application services.
Chapter 7 explains why domain services, one of the components of the domain area, are needed and how to implement them.
Chapter 8 examines the transaction scope of the aggregate.
This paper introduces a method for implementing preemptive locking using DBMS and non-preemptive locking using versions for transaction processing of aggregates.
Chapter 9 covers bounded context, one of the most important concepts along with aggregate.
Learn what bounded contexts are and the integration and relationships between each context.
Chapters 10 and 11 explain events and CQRS, respectively.
Chapter 10 explains how to use domain events to loosen the coupling of a system and extend its functionality, and also looks at several implementations of asynchronous event processing.
Chapter 11 explains what CQRS is and what benefits it can provide.
Contents covered
* Understanding the domain model, the concept of entities and values
* Key area components of architecture and DIP pattern
* Understanding and implementing key DDD patterns such as aggregates and repositories
* How to link application services and expression areas
* The necessity of domain services and how to implement them
* How to handle transaction conflicts in the domain model
* How to reduce the coupling of a system and expand its functionality by using domain events.
* The concept of CQRS and how to divide the command model/query model
Target audience
This book is intended for developers new to DDD and is aimed at beginners. It doesn't teach you how to become a DDD expert.
If you have already mastered the basics of DDD, I hope you will feel the depth of DDD through other books.
If you are still unfamiliar with DDD but are interested, this book will satisfy your curiosity about DDD.
Example source
The example code was written using Maven, Java 17, Spring Boot, JPA (Hibernate), Thymeleaf, and MySQL.
https://github.com/madvirus/ddd-start2
Contents of this book
Chapters 1 and 2 cover the basics you need to know when implementing a domain model.
In Chapter 1, we will learn what a domain model is and explore entities and values.
Chapter 2 describes the four domains of architecture and the DIP pattern at a high level and looks at the components of the domain area.
Chapters 3 through 5 explain aggregates and repositories.
Aggregators are responsible for grouping complex domain models into manageable units.
In Chapter 3, we will learn what an aggregate is and how to implement it.
In Chapter 4, we will learn how to implement a repository, which is a logical storage for aggregates, and in Chapter 5, we will implement search functions such as specifications for search conditions, sorting, and paging.
Chapter 6 describes the application services and expression areas.
We will explore how application services use the domain model and what role they play, and explain the integration between the presentation domain and application services.
Chapter 7 explains why domain services, one of the components of the domain area, are needed and how to implement them.
Chapter 8 examines the transaction scope of the aggregate.
This paper introduces a method for implementing preemptive locking using DBMS and non-preemptive locking using versions for transaction processing of aggregates.
Chapter 9 covers bounded context, one of the most important concepts along with aggregate.
Learn what bounded contexts are and the integration and relationships between each context.
Chapters 10 and 11 explain events and CQRS, respectively.
Chapter 10 explains how to use domain events to loosen the coupling of a system and extend its functionality, and also looks at several implementations of asynchronous event processing.
Chapter 11 explains what CQRS is and what benefits it can provide.
Contents covered
* Understanding the domain model, the concept of entities and values
* Key area components of architecture and DIP pattern
* Understanding and implementing key DDD patterns such as aggregates and repositories
* How to link application services and expression areas
* The necessity of domain services and how to implement them
* How to handle transaction conflicts in the domain model
* How to reduce the coupling of a system and expand its functionality by using domain events.
* The concept of CQRS and how to divide the command model/query model
Target audience
This book is intended for developers new to DDD and is aimed at beginners. It doesn't teach you how to become a DDD expert.
If you have already mastered the basics of DDD, I hope you will feel the depth of DDD through other books.
If you are still unfamiliar with DDD but are interested, this book will satisfy your curiosity about DDD.
Example source
The example code was written using Maven, Java 17, Spring Boot, JPA (Hibernate), Thymeleaf, and MySQL.
https://github.com/madvirus/ddd-start2
GOODS SPECIFICS
- Publication date: March 21, 2022
- Page count, weight, size: 356 pages | 188*235*30mm
- ISBN13: 9791162245385
- ISBN10: 1162245387
You may also like
카테고리
korean
korean