14. 領域驅動開發的思考模式
• Process Base Thinking
• Forward Design
Domain Experts And
Development Team
Domain Knowledge
Ubiquitous
Language
Problem Domain Requirement
+
Business Wish
Understand the
language of the
domain
Domain Modeling
17. Clean Architecture
The goal of software architecture is to minimize the human
resources required to build and maintain the required
system.
軟體架構的目的是最小化建置與維護「需求系統」所需要的人力資源。
18. .NET Core 的 DI 與 Middleware
OS
KestrelSelf HostIIS
Host
Your App
Infrastructure
DI Container
App
24. In order to create these maps of your code, we first need a
common set of abstractions to create a ubiquitous
language that we can use to describe the static structure of
a software system.
Abstractions
抽象化
From:Simon Brown
26. The C4 model for Visualizing
software architecture
Level1
Level2
Level3
Level4
Zoom in
Zoom in
Zoom in
以房貸線上申請為例
1. System Context
2. Containers
3. Components
4. Code From:Simon Brown
https://c4model.com/
36. 領域事件 (Domain Event) vs. UML Use Case 主要事件流
領域事件(Domain Event) UML Use Case 主要事件流
我要線上申
請房貸顧客
• 領域事件與領域中發生的活動
有關,是領域內所發生的事情
37. 聚合 (Aggregate) - 不變條件 vs. Use Case (Pre-conditions/Post-conditions)
聚合 (Aggregate)
• 貸款金額必須大於 50 萬
• 轉帳時需填帳戶與手機號碼
Use Case
(Pre-conditions/Post-conditions)
vs.
38. 戰術建模 (Tactical Modeling) vs. UML Domain Class Diagram
領域事件 (Domain Event)
識別領域事件
Use Case Scenario
我要線上申
請房貸顧客
39. Bounded Context vs. Use Case Boundary
Housing Bounded Context UC_01_HousingApplication
Housing Application Bounded Context
HttpClient
Message System
CustomerDetailAdapter
找出「Actor」最重要的就是「系統邊
界」,邊界類別所代表的正式系統的邊界
Domain service
調用簡訊服務