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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Buzzvil
April 18, 2018
Programming
0
960
Clean Architecture
By Yohan
Buzzvil
April 18, 2018
Tweet
Share
More Decks by Buzzvil
See All by Buzzvil
220903_GFS
buzzvil
0
560
Git 해부하기 2 + 3
buzzvil
0
54
Metastable Failure
buzzvil
0
280
Git 해부하기
buzzvil
0
68
Introduction to Plate Solving
buzzvil
0
57
Airbnb Minerva
buzzvil
0
420
Shape up 방법론
buzzvil
0
1k
Buzzvil Billing Data Pipeline
buzzvil
0
650
Journey of Dash's release-cycle
buzzvil
0
220
Other Decks in Programming
See All in Programming
Oxlint JS plugins
kazupon
1
810
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Patterns of Patterns
denyspoltorak
0
1.4k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Oxlintはいいぞ
yug1224
5
1.3k
2026年 エンジニアリング自己学習法
yumechi
0
130
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
930
Featured
See All Featured
Designing for Performance
lara
610
70k
Faster Mobile Websites
deanohume
310
31k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Writing Fast Ruby
sferik
630
62k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Git: the NoSQL Database
bkeepers
PRO
432
66k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
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