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
500
Git 해부하기 2 + 3
buzzvil
0
44
Metastable Failure
buzzvil
0
260
Git 해부하기
buzzvil
0
56
Introduction to Plate Solving
buzzvil
0
46
Airbnb Minerva
buzzvil
0
360
Shape up 방법론
buzzvil
0
980
Buzzvil Billing Data Pipeline
buzzvil
0
590
Journey of Dash's release-cycle
buzzvil
0
200
Other Decks in Programming
See All in Programming
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
4
14k
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
120
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
EMこそClaude Codeでコード調査しよう
shibayu36
0
370
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
150
contribution to astral-sh/uv
shunsock
0
530
Flutterで分数(Fraction)を表示する方法
koukimiura
0
140
Google Opalで使える37のライブラリ
mickey_kubo
3
140
Introduce Hono CLI
yusukebe
6
3.1k
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
710
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
4.9k
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
610
The World Runs on Bad Software
bkeepers
PRO
72
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Mobile First: as difficult as doing things right
swwweet
225
10k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
630
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