實現領域驅動設計英文版

實現領域驅動設計英文版

《實現領域驅動設計英文版》是2016年4月電子工業出版社出版發行的圖書,作者是Vaughn Vernon(沃恩.弗農)。

基本介紹

  • 書名:實現領域驅動設計英文版
  • 作者:Vaughn Vernon(沃恩.弗農) 
  • ISBN:978-7-121-27274-5
  • 頁數:648
  • 定價:118.00元 
  • 出版社電子工業出版社
  • 出版時間:2016年4月
  • 開本:16
圖書簡介,內容簡介,目錄,序言,作者簡介,

圖書簡介

領域驅動設計(DDD)是教我們如何做好軟體的,同時也是教我們如何更好地使用面向對象技術的。它為我們提供了設計軟體的全新視角,同時也給開發者留下了一大難題:如何將領域驅動設計付諸實踐?VaughnVernon的這本《實現領域驅動設計》為我們給出了全面的解答。《實現領域驅動設計英文版》分別從戰略和戰術層面詳盡地討論了如何實現DDD,其中包含了大量的優秀實踐、設計準則和對一些問題的折中性討論。《實現領域驅動設計英文版》共分為14章。DDD戰略部分講解了領域、限界上下文、上下文映射圖和架構等內容;戰術部分包括實體、值對象、領域服務、領域事件、聚合和資源庫等內容。一個虛構的案例研究貫穿全書,這對於實例講解DDD實現來說非常有用。《實現領域驅動設計英文版》在DDD的思想和實現之間建立起了一座橋樑,架構師和程式設計師均可閱讀,同時也可以作為一本DDD參考書。

內容簡介

領域驅動設計(DDD)是教我們如何做好軟體的,同時也是教我們如何更好地使用面向對象技術的。它為我們提供了設計軟體的全新視角,同時也給開發者留下了一大難題:如何將領域驅動設計付諸實踐?VaughnVernon的這本《實現領域驅動設計》為我們給出了全面的解答。《實現領域驅動設計英文版》分別從戰略和戰術層面詳盡地討論了如何實現DDD,其中包含了大量的優秀實踐、設計準則和對一些問題的折中性討論。《實現領域驅動設計英文版》共分為14章。DDD戰略部分講解了領域、限界上下文、上下文映射圖和架構等內容;戰術部分包括實體、值對象、領域服務、領域事件、聚合和資源庫等內容。一個虛構的案例研究貫穿全書,這對於實例講解DDD實現來說非常有用。《實現領域驅動設計英文版》在DDD的思想和實現之間建立起了一座橋樑,架構師和程式設計師均可閱讀,同時也可以作為一本DDD參考書。

目錄

Chapter 1 Getting Started with DDD
Can I DDD?
Why You Should Do DDD
How to Do DDD
The Business Value of Using DDD
1. The Organization Gains a Useful Model of Its Domain
2. A Refined, Precise Definition and Understanding of the Business Is Developed
3. Domain Experts Contribute to Software Design
4. A Better User Experience Is Gained
5. Clean Boundaries Are Placed around Pure Models
6. Enterprise Architecture Is Better Organized
7. Agile, Iterative, Continuous Modeling Is Used
8. New Tools, Both Strategic and Tactical, Are Employed
The Challenges of Applying DDD
Fiction, with Bucketfuls of Reality
Wrap-Up
Chapter 2 Domains, Subdomains, and Bounded Contexts
Big Picture
Subdomains and Bounded Contexts at Work
Focus on the Core Domain
Why Strategic Design Is So Incredibly Essential
Real-World Domains and Subdomains
Making Sense of Bounded Contexts
Room for More than the Model
Size of Bounded Contexts
Aligning with Technical Components
Sample Contexts
Collaboration Context.
Identity and Access Context.
Agile Project Management Context
Wrap-Up
Chapter 3 Context Maps
Why Context Maps Are So Essential
Drawing Context Maps
Projects and Organizational Relationships
Mapping the Three Contexts
Wrap-Up
Chapter 4 Architecture
Interviewing the Successful CIO
Layers
Dependency Inversion Principle
Hexagonal or Ports and Adapters
Service-Oriented
Representational State Transfer—REST
REST as an Architectural Style
Key Aspects of a RESTful HTTP Server
Key Aspects of a RESTful HTTP Client
REST and DDD
Why REST?
Command-Query Responsibility Segregation, or CQRS
Examining Areas of CQRS
Dealing with an Eventually Consistent Query Model
Event-Driven Architecture
Pipes and Filters
Long-Running Processes, aka Sagas
Event Sourcing
Data Fabric and Grid-Based Distributed Computing
Data Replication
Event-Driven Fabrics and Domain Events
Continuous Queries
Distributed Processing
Wrap-Up
Chapter 5 Entities
Why We Use Entities
Unique Identity.
User Provides Identity
Application Generates Identity
Persistence Mechanism Generates Identity
Another Bounded Context Assigns Identity
When the Timing of Identity Generation Matters
Surrogate Identity
Identity Stability.
Discovering Entities and Their Intrinsic Characteristics
Uncovering Entities and Properties
Digging for Essential Behavior
Roles and Responsibilities
Construction
Validation
Change Tracking
Wrap-Up
Chapter 6 Value Objects
Value Characteristics
Measures, Quantifies, or Describes
Immutable
Conceptual Whole
Replaceability
Value Equality.
Side-Effect-Free Behavior
Integrate with Minimalism.
Standard Types Expressed as Values
Testing Value Objects
Implementation.
Persisting Value Objects
Reject Undue Influence of Data Model Leakage.
ORM and Single Value Objects
ORM and Many Values Serialized into a Single Column
ORM and Many Values Backed by a Database Entity.
ORM and Many Values Backed by a Join Table.
ORM and Enum-as-State Objects
Wrap-Up
Chapter 7 Services
What a Domain Service Is (but First, What It Is Not)
Make Sure You Need a Service.
Modeling a Service in the Domain
Is Separated Interface a Necessity?
A Calculation Process
Transformation Services.
Using a Mini-Layer of Domain Services
Testing Services.
Wrap-Up
Chapter 8 Domain Events
The When and Why of Domain Events
Modeling Events
With Aggregate Characteristics
Identity
Publishing Events from the Domain Model
Publisher
Subscribers
Spreading the News to Remote Bounded Contexts
Messaging Infrastructure Consistency
Autonomous Services and Systems
Latency Tolerances
Event Store
Architectural Styles for Forwarding Stored Events
Publishing Notifications as RESTful Resources
Publishing Notifications through Messaging Middleware
Implementation
Publishing the NotificationLog
Publishing Message-Based Notifications
Wrap-Up
Chapter 9 Modules
Designing with Modules
Basic Module Naming Conventions
Module Naming Conventions for the Model.
Modules of the Agile Project Management Context
Modules in Other Layers
Module before Bounded Context
Wrap-Up
Chapter 10 Aggregates
Using Aggregates in the Scrum Core Domain
First Attempt: Large-Cluster Aggregate
Second Attempt: Multiple Aggregates
Rule: Model True Invariants in Consistency Boundaries
Rule: Design Small Aggregates
Don’t Trust Every Use Case
Rule: Reference Other Aggregates by Identity
Making Aggregates Work Together through Identity
References
Model Navigation
Scalability and Distribution
Rule: Use Eventual Consistency Outside the Boundary
Ask Whose Job It Is
Reasons to Break the Rules
Reason One: User Interface Convenience
Reason Two: Lack of Technical Mechanisms
Reason Three: Global Transactions
Reason Four: Query Performance
Adhering to the Rules
Gaining Insight through Discovery.
Rethinking the Design, Again
Estimating Aggregate Cost
Common Usage Scenarios
Memory Consumption
Exploring Another Alternative Design
Implementing Eventual Consistency.
Is It the Team Member’s Job?
Time for Decisions
Implementation
Create a Root Entity with Unique Identity
Favor Value Object Parts
Using Law of Demeter and Tell, Don’t Ask
Optimistic Concurrency.
Avoid Dependency Injection.
Wrap-Up
Chapter 11 Factories
Factories in the Domain Model
Factory Method on Aggregate Root
Creating CalendarEntry Instances
Creating Discussion Instances
Factory on Service
Wrap-Up
Chapter 12 Repositories
Collection-Oriented Repositories
Hibernate Implementation
Considerations for a TopLink Implementation
Persistence-Oriented Repositories
Coherence Implementation
MongoDB Implementation
Additional Behavior
Managing Transactions
A Warning
Type Hierarchies
Repository versus Data Access Object
Testing Repositories
Testing with In-Memory Implementations
Wrap-Up
Chapter 13 Integrating Bounded Contexts
Integration Basics
Distributed Systems Are Fundamentally Different
Exchanging Information across System Boundaries
Integration Using RESTful Resources
Implementing the RESTful Resource
Implementing the REST Client Using an Anticorruption Layer
Integration Using Messaging
Staying Informed about Product Owners and Team Members
Can You Handle the Responsibility?
Long-Running Processes, and Avoiding Responsibility
Process State Machines and Time-out Trackers
Designing a More Sophisticated Process
When Messaging or Your System Is Unavailable
Wrap-Up
Chapter 14 Application.
User Interface
Rendering Domain Objects
Render Data Transfer Object from Aggregate Instances
Use a Mediator to Publish Aggregate Internal State
Render Aggregate Instances from a Domain Payload Object
State Representations of Aggregate Instances
Use Case Optimal Repository Queries.
Dealing with Multiple, Disparate Clients
Rendition Adapters and Handling User Edits
Application Services
Sample Application Service
Decoupled Service Output
Composing Multiple Bounded Contexts
Infrastructure
Enterprise Component Containers
Wrap-Up
Appendix A Aggregates and Event Sourcing: A+ES
Inside an Application Service
Command Handlers
Lambda Syntax
Concurrency Control.
Structural Freedom with A+ES
Performance
Implementing an Event Store
Relational Persistence
BLOB Persistence
Focused Aggregates
Read Model Projections
Use with Aggregate Design
Events Enrichment
Supporting Tools and Patterns
Event Serializers
Event Immutability
Value Objects
Contract Generation
Unit Testing and Specifications
Event Sourcing in Functional Languages
Bibliography
Index

序言

在本書中,Vaughn Vernon以一種特有的方式向我們展示了領域驅動設計(Domain-Driven Design,DDD)的各個方面,其中包括對新概念的解釋、新的例子和原創的話題組織方式。我相信,這種新穎的方式可以幫助大家掌握DDD的各種微妙之處,特別是非常抽象的聚合和限界上下文。不同的人習慣用不同的方式來理解這些概念,而在缺少多種解釋的情況下,想要了解這些微妙的抽象概念是非常困難的。
本書包含了在過去9年中出現在各種論文和講稿中的對DDD的深層剖析,而這些是在之前的書籍中沒有的。本書將領域事件與實體和值對象一道看作是模型的基礎部件。另外,書中還討論了“大泥球”(Big Ball of Mud)架構和如何將其放置在上下文映射圖(Context Map)中。Vaughn還向我們闡述了六邊形架構(Hexagonal Architecture),這種新興的架構與分層架構相比,能夠更好地描述我們要完成的事情。
我是在將近兩年前第一次接觸到本書內容的,那時Vaughn已經開始撰寫本書有一段時間了。在第一次DDD峰會上,我們中的幾個編寫了關於DDD的若干話題,比如有關DDD的新知識,或者DDD社區所期待的一些針對性建議等。Vaughn負責寫聚合部分,這一寫便是一個有關聚合的文章系列,並且寫得非常出色,最後,這個系列成為了本書中的一個章節。
在那次峰會上,與會人員們一致認為:一套更加具有規約性的DDD模式是大有裨益的。誠實地講,對於軟體開發中的任何問題,答案都是“得看情況”。然而,這對於那些希望學到實際套用技術的人來說卻沒多大用處。人們需要更加實際的指導。經驗法則不見得一定要放之四海而皆準,但在通常情況下,它們可以工作得很好,也應該被首先嘗試。出於自身的果決性,這些經驗法則蘊含著解決問題的思想方法。Vaughn的這本《實現領域驅動設計》將各種明晰的建議很好地融合在一起,同時又給出了一些折中性的討論,從而避免了將這些建議過於簡單化。
一些額外的DDD模式,比如領域事件,已經成為了DDD的主流模式,人們也學會了如何套用這些模式,並嘗試著在新架構和新技術中採用這些模式。在我的《領域驅動設計:軟體核心複雜性應對之道》出版9年後,有太多關於DDD的新知識需要談及,Vaughn的這本書則是最全面的闡述。
Eric Evans
Domain Language, Inc.

作者簡介

Vaughn Vernon 是一個經驗豐富的軟體工程師,在軟體設計、開發和架構方面擁有超過25年的從業經驗。他提倡通過創新來簡化軟體的設計和實現。從20世紀80年代起,他便開始使用面向對象語言進行編程;在20世紀90年代早期,他便在領域建模中套用了領域驅動設計,那時他使用的是Smalltalk語言。他在很多業務領域都有從業經驗,包括航空、環境、地理、保險、醫學和電信等領域。同時,Vaughn在技術上也取得了很大的成功,包括開發可重用的框架和類庫等。他在全球範圍之內提供軟體諮詢和演講,此外,他還在許多國家教授《實現領域驅動設計》的課程。

相關詞條

熱門詞條

聯絡我們