SlideShare une entreprise Scribd logo
1  sur  45
Teddy Chen
teddy@teddysoft.tw
http://teddy-chen-tw.blogspot.tw/
April 12 2018
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
The architecture of a software is the
shape given to that system by those
who build it.
(軟體架構是構建者給予它的形狀。)
Copyright@2012-2018 Teddysoft
《Clean Architecture》
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
The form of that shape is in the division
of the system into components, the
arrangement of those components, and
the ways in which those components
communicate with each other.
(該形狀的形式是將系統劃分為組件,這些組
件的佈置以及這些組件彼此溝通的方式。)
Copyright@2012-2018 Teddysoft
《Clean Architecture》
Copyright@2012-2018 Teddysoft
Source : https://goo.gl/NL1LYK
Copyright@2012-2018 Teddysoft
The ultimate goal of software
architecture is to minimize the
lifetime cost of the system and to
maximize programmer
productivity.
Copyright@2012-2018 Teddysoft
《Clean Architecture》
The ultimate goal of 加班
is to minimize the lifetime cost of
the system company and to
maximize programmer
productivity.
Copyright@2012-2018 Teddysoft
《Clean Architecture》
https://goo.gl/aCZHLM
The purpose of the shape is to
facilitate the development,
deployment, operation, and
maintenance of the software system
contained within it.
(形狀的目的是為了便於其中包含的軟體系統
的開發、部署、操作和維護。)
Copyright@2012-2018 Teddysoft
《Clean Architecture》
• Their trouble do not lie in their operation;
rather, they occur in their deployment,
maintenance, and ongoing development.
Copyright@2012-2018 Teddysoft 《Clean Architecture》
Copyright@2012-2018 Teddysoft
• The word architecture is often used in the
context of something at a high level that is
divorced from the low-level details, whereas
design more often seems to imply structures
and decisions at a lower level.
• The low-level and the high-level structure are
all part of the same whole. You cannot have
one without the other; indeed, no clear
dividing line separates them. There is simply a
continuum of decisions from the highest to
the lowest levels.
Copyright@2012-2018 Teddysoft
《Clean Architecture》
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
UI
Application
DB
Model
Dependency
Copyright@2012-2018 Teddysoft
Dependency Inversion Principle
這是什麼設計模式?
Copyright@2012-2018 Teddysoft
《Clean Architecture》
• 相依性的方向永遠從低層往高層
• 何謂低層,何謂高層?
– 離I/O愈遠的越高層
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
UI
Application
DB
Model
I/O
I/O
畫成傳統的階層式架構不容易看出層次
Copyright@2012-2018 Teddysoft
Model
ApplicationUI
DB
Dependency
Dependency
不一定要畫成六角形,也可以畫成圓形。
• Components
• Arrangement of those components
• Communication of the components
Copyright@2012-2018 Teddysoft
✔
✔
?
• 同一層
• 跨層
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Model
Application
UI
DB
Adapter
Port: Interfaces to the outside world
Adapter: Bridges between boundaries
Copyright@2012-2018 Teddysoft
Input
Function
Output
int add (int x, int y)
Browser
network boundary
Copyright@2012-2018 Teddysoft
Input
Function
Output
int add (int x, int y)
Browser
network boundary
Adapter
x = request.getAsInt(“x”);
y = request.getAsInt(“y”)
result = add(x, y);
response.
add(“result”, result);
• 只有Application (Use Case)層可以存取 Domain
(Entity)層。Domain物件不會透過Application階層
直接往外傳遞。
• 跨層傳遞資料需要內層定義介面,外層透過這個介面
與內層溝通。
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Host Service
Command Contact
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
《Clean Architecture》
Copyright@2012-2018 Teddysoft
• Screaming Architecture
– Package by Feature or by layers
• Duplication
– A lot of DTOs
• Dynamic typing languages
• Annotations in the domain layer
• Cross-cutting concerns
– e.g., logging, security, transaction
• Clean Architecture and Domain-Driven Design
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
Copyright@2012-2018 Teddysoft
• 搞笑談軟工部落格
– http://teddy-chen-tw.blogspot.com
• 搞笑談軟工Facebook
– https://www.facebook.com/groups/teddy.tw
• 泰迪軟體官方網站
– http://teddysoft.tw
Copyright@2012-2018 Teddysoft

Contenu connexe

Similaire à 洗白你的軟體架構

Thoughts On Architecting V4 2
Thoughts On Architecting V4 2Thoughts On Architecting V4 2
Thoughts On Architecting V4 2
bmercer
 
Organizing Design-Driven Development Using Rational Requirements Composer
Organizing Design-Driven Development Using Rational Requirements ComposerOrganizing Design-Driven Development Using Rational Requirements Composer
Organizing Design-Driven Development Using Rational Requirements Composer
Kurt Solarte
 
Model Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & FutureModel Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & Future
elliando dias
 
Paul Brown Org Man Issues
Paul  Brown    Org  Man  IssuesPaul  Brown    Org  Man  Issues
Paul Brown Org Man Issues
SOA Symposium
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
Wade Wegner
 

Similaire à 洗白你的軟體架構 (20)

Semantech: IT Architecture in the Enterprise
Semantech: IT Architecture in the EnterpriseSemantech: IT Architecture in the Enterprise
Semantech: IT Architecture in the Enterprise
 
Thoughts On Architecting V4 2
Thoughts On Architecting V4 2Thoughts On Architecting V4 2
Thoughts On Architecting V4 2
 
Thoughtful Software Design
Thoughtful Software DesignThoughtful Software Design
Thoughtful Software Design
 
Organizing Design-Driven Development Using Rational Requirements Composer
Organizing Design-Driven Development Using Rational Requirements ComposerOrganizing Design-Driven Development Using Rational Requirements Composer
Organizing Design-Driven Development Using Rational Requirements Composer
 
DataOps - The Foundation for Your Agile Data Architecture
DataOps - The Foundation for Your Agile Data ArchitectureDataOps - The Foundation for Your Agile Data Architecture
DataOps - The Foundation for Your Agile Data Architecture
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
ASAS 2014 - Simon Brown
ASAS 2014 - Simon BrownASAS 2014 - Simon Brown
ASAS 2014 - Simon Brown
 
Dell Technology World - CloudOps - Leveraging DevOps Principles and Practice...
Dell Technology  World - CloudOps - Leveraging DevOps Principles and Practice...Dell Technology  World - CloudOps - Leveraging DevOps Principles and Practice...
Dell Technology World - CloudOps - Leveraging DevOps Principles and Practice...
 
Model Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & FutureModel Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & Future
 
Smart Grid Analytics: All That Remains to be Ready is You
Smart Grid Analytics: All That Remains to be Ready is YouSmart Grid Analytics: All That Remains to be Ready is You
Smart Grid Analytics: All That Remains to be Ready is You
 
Paul Brown Org Man Issues
Paul  Brown    Org  Man  IssuesPaul  Brown    Org  Man  Issues
Paul Brown Org Man Issues
 
Architecting-Flow-in-SE.pdf
Architecting-Flow-in-SE.pdfArchitecting-Flow-in-SE.pdf
Architecting-Flow-in-SE.pdf
 
#STC13: The Future of Tech Comm is Here. Are you ready for it?
#STC13: The Future of Tech Comm is Here. Are you ready for it?#STC13: The Future of Tech Comm is Here. Are you ready for it?
#STC13: The Future of Tech Comm is Here. Are you ready for it?
 
Semantech Inc. Architecture Fusion
Semantech Inc. Architecture FusionSemantech Inc. Architecture Fusion
Semantech Inc. Architecture Fusion
 
Dom introduction-website-v1.0
Dom introduction-website-v1.0Dom introduction-website-v1.0
Dom introduction-website-v1.0
 
Notes for Evolutionary Development Methodology
Notes for Evolutionary Development MethodologyNotes for Evolutionary Development Methodology
Notes for Evolutionary Development Methodology
 
Semantic Systems Integration
Semantic Systems IntegrationSemantic Systems Integration
Semantic Systems Integration
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
 
How to effectively monitor and manage IT assets in real-time using SanerNow
How to effectively monitor and manage IT assets in real-time using SanerNowHow to effectively monitor and manage IT assets in real-time using SanerNow
How to effectively monitor and manage IT assets in real-time using SanerNow
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 

Plus de teddysoft

從五個小故事看敏捷開發精神
從五個小故事看敏捷開發精神從五個小故事看敏捷開發精神
從五個小故事看敏捷開發精神
teddysoft
 
Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材
teddysoft
 

Plus de teddysoft (20)

Dci vs aggregate_dddtw_2021-0.3-16-9
Dci vs aggregate_dddtw_2021-0.3-16-9Dci vs aggregate_dddtw_2021-0.3-16-9
Dci vs aggregate_dddtw_2021-0.3-16-9
 
Dci vs aggregate_dddtw_2021-0.3-preview
Dci vs aggregate_dddtw_2021-0.3-previewDci vs aggregate_dddtw_2021-0.3-preview
Dci vs aggregate_dddtw_2021-0.3-preview
 
DDD + Clean Architecture: 從需求到實作
DDD + Clean Architecture: 從需求到實作DDD + Clean Architecture: 從需求到實作
DDD + Clean Architecture: 從需求到實作
 
漫談重構
漫談重構漫談重構
漫談重構
 
Pattern based problem solving-published
Pattern based problem solving-publishedPattern based problem solving-published
Pattern based problem solving-published
 
Agile the timeless way of software development-2019-05-17-v1.2-published
Agile the timeless way of software development-2019-05-17-v1.2-publishedAgile the timeless way of software development-2019-05-17-v1.2-published
Agile the timeless way of software development-2019-05-17-v1.2-published
 
當Scrum遇到Pattern
當Scrum遇到Pattern當Scrum遇到Pattern
當Scrum遇到Pattern
 
說出一嘴好設計 1.1
說出一嘴好設計 1.1說出一嘴好設計 1.1
說出一嘴好設計 1.1
 
跟著Teddy讀Pattern
跟著Teddy讀Pattern跟著Teddy讀Pattern
跟著Teddy讀Pattern
 
如何學好設計模式
如何學好設計模式如何學好設計模式
如何學好設計模式
 
Bdd atdd sbe_tdd_ddd_published
Bdd atdd sbe_tdd_ddd_publishedBdd atdd sbe_tdd_ddd_published
Bdd atdd sbe_tdd_ddd_published
 
重構三兩事
重構三兩事重構三兩事
重構三兩事
 
了解模式讓你更敏捷 (C C Agile 活動分享)
了解模式讓你更敏捷 (C C Agile 活動分享)了解模式讓你更敏捷 (C C Agile 活動分享)
了解模式讓你更敏捷 (C C Agile 活動分享)
 
從五個小故事看敏捷開發精神
從五個小故事看敏捷開發精神從五個小故事看敏捷開發精神
從五個小故事看敏捷開發精神
 
軟體開發成功的秘訣
軟體開發成功的秘訣軟體開發成功的秘訣
軟體開發成功的秘訣
 
[演講] Scrum導入經驗分享
[演講] Scrum導入經驗分享[演講] Scrum導入經驗分享
[演講] Scrum導入經驗分享
 
那一夜我們說Pattern design patterns 20周年-published
那一夜我們說Pattern design patterns 20周年-published那一夜我們說Pattern design patterns 20周年-published
那一夜我們說Pattern design patterns 20周年-published
 
好設計如何好 @ C.C. Agile #14
好設計如何好 @ C.C. Agile #14好設計如何好 @ C.C. Agile #14
好設計如何好 @ C.C. Agile #14
 
[教材] 例外處理設計與重構實作班201309
[教材] 例外處理設計與重構實作班201309[教材] 例外處理設計與重構實作班201309
[教材] 例外處理設計與重構實作班201309
 
Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材
 

Dernier

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Dernier (20)

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 

洗白你的軟體架構