10. 軟體架構的目標
“The goal of software architecture is to minimize
the human resources required to build and
maintain the required system.”
Robert C. Martin – Clean Architecture
minimize
10
前導
63. 先來看看DRY的描述
“Every piece of knowledge must have a single,
unambiguous, authoritative representation
within a system”
Andy Hunt – The Pragmatic Programmer
63
心法
91. Clean Architecture的Use Case交互物件
91
個人觀點
? Clean Architecture中的Use Case物件旨在: 為了完成某個商業目標而指導協作多個
Entity的資料處理流程。
? 其概念與流程控制的Controller極為相似,但是在Clean Architecture書中的概念圖中,可
以觀察到Controller似乎與Use Case交互物件並不相同。
? 在推敲下有一個可能,Use Case交互物件:
即為PoEAA書中針對商業邏輯層設計的-Transaction Script
? PoEAA的商業邏輯層設計並非是零和遊戲,亦即可以讓多個一起協作互動,而
Clean Architecture即是合併: Transaction Script與Rich Model
“These use cases orchestrate the flow of data to and from the entities,
and direct those entities to use their Critical Business Rules to achieve the goals of the use case.”
-- Clean Architecture
心法
97. 架構模式(Pattern)
An architectural pattern is a general, reusable solution to a commonly occurring problem in
software architecture within a given context. Architectural patterns are often documented as
software design patterns.
Following traditional building architecture, a ‘software architectural style’ is a specific method
of construction, characterized by the features that make it notable
-- by Wiki
97
模式
98. 架構樣式(Style)
An architectural style defines: a family of systems in terms of a pattern of structural
organization; a vocabulary of components and connectors, with constraints on
how they can be combined.
Architectural styles are reusable ‘packages’ of design decisions and constraints that are applied
to an architecture to induce chosen desirable qualities.
-- by Wiki
98
模式