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
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
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
700
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
180
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
AI巻き込み型コードレビューのススメ
nealle
0
130
Basic Architectures
denyspoltorak
0
660
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
HDC tutorial
michielstock
1
360
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
RailsConf 2023
tenderlove
30
1.3k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
64
Believing is Seeing
oripsolob
1
53
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
Tell your own story through comics
letsgokoyo
1
810
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
320
Practical Orchestrator
shlominoach
191
11k
Making Projects Easy
brettharned
120
6.6k
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