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
470
Git 해부하기 2 + 3
buzzvil
0
37
Metastable Failure
buzzvil
0
230
Git 해부하기
buzzvil
0
48
Introduction to Plate Solving
buzzvil
0
39
Airbnb Minerva
buzzvil
0
320
Shape up 방법론
buzzvil
0
950
Buzzvil Billing Data Pipeline
buzzvil
0
550
Journey of Dash's release-cycle
buzzvil
0
180
Other Decks in Programming
See All in Programming
WindowInsetsだってテストしたい
ryunen344
1
190
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
830
A comprehensive view of refactoring
marabesi
0
970
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
130
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
GoのGenericsによるslice操作との付き合い方
syumai
2
680
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
41
28k
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
850
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
220
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
670
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
790
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
524
40k
Building Adaptive Systems
keathley
43
2.6k
Unsuck your backbone
ammeep
671
58k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Become a Pro
speakerdeck
PRO
28
5.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
A better future with KSS
kneath
239
17k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
YesSQL, Process and Tooling at Scale
rocio
173
14k
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