Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Clean Architecture
Search
Buzzvil
April 18, 2018
Programming
0
950
Clean Architecture
By Yohan
Buzzvil
April 18, 2018
Tweet
Share
More Decks by Buzzvil
See All by Buzzvil
220903_GFS
buzzvil
0
490
Git 해부하기 2 + 3
buzzvil
0
42
Metastable Failure
buzzvil
0
250
Git 해부하기
buzzvil
0
55
Introduction to Plate Solving
buzzvil
0
43
Airbnb Minerva
buzzvil
0
350
Shape up 방법론
buzzvil
0
970
Buzzvil Billing Data Pipeline
buzzvil
0
580
Journey of Dash's release-cycle
buzzvil
0
200
Other Decks in Programming
See All in Programming
ソフトウェア設計の実践的な考え方
masuda220
PRO
3
500
Signals & Resource API in Angular: 3 Effective Rules for Your Architecture @BASTA 2025 in Mainz
manfredsteyer
PRO
0
110
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
160
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
940
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
370
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
150
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
170
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
240
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
160
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
6
3.7k
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
200
CSC509 Lecture 02
javiergs
PRO
0
410
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.4k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Building an army of robots
kneath
306
46k
Docker and Python
trallard
46
3.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Unsuck your backbone
ammeep
671
58k
Site-Speed That Sticks
csswizardry
11
880
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Bash Introduction
62gerente
615
210k
Transcript
None
Clean Code - quick summary • Naming • Small functions
• Meaningful comments • Data abstraction • Error Handling • TDD(Unit Tests) • Building Systems
None
Goals At working at module level, software structure should •
Tolerate changes • Easy to understand • Basic components for reuse
Our Enemies • Rigidity - difficult to change • Fragility
- easy to break • Immobility - difficult to reuse • Viscosity - resistance against making changes
SOLID Principles • Single Responsibility • Open-closed • Liskov substitution
• Interface segregation • Dependency Inversion
Single Responsibility Principle (SRP) • A module should be responsible
to one, and only one, actor
SRP: Violation Employee -regularHours +calculatePay +reportHours +save Roy John Zune
SRP: Solution Employee Facade +calculatePay +reportHours +save PayCalculator +calculatePay HourReporter
+reportHours EmployeeSaver +save
Open-closed Principle • Open for extension but closed for modification
• Example with inheritance ◦ Bad ◦ Good
Liskov Substitution Principle • If for each object o1 of
type S, there is an object o2 of type T, such that, for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2, then S is a subtype of T
None
None
LSP Violation Rectangle +setHeight +setWidth Square +setSides User
Interface Segregation Principle (ISP)
ISP Violation Ops +ops0 +ops1 +ops2 User0 User1 User2
Dependency Inversion Principle • Source code should interact with abstractions,
not concretions • Stable vs volatile concrete elements
Takeaways • Consider actors in the system • Keep options
open with layers • Interact with abstractions over details