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
970
Clean Architecture
By Yohan
Buzzvil
April 18, 2018
Tweet
Share
More Decks by Buzzvil
See All by Buzzvil
220903_GFS
buzzvil
0
570
Git 해부하기 2 + 3
buzzvil
0
58
Metastable Failure
buzzvil
0
290
Git 해부하기
buzzvil
0
70
Introduction to Plate Solving
buzzvil
0
63
Airbnb Minerva
buzzvil
0
450
Shape up 방법론
buzzvil
0
1k
Buzzvil Billing Data Pipeline
buzzvil
0
660
Journey of Dash's release-cycle
buzzvil
0
220
Other Decks in Programming
See All in Programming
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
590
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
520
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
170
20260315 AWSなんもわからん🥲
chiilog
2
170
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
300
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.1k
SourceGeneratorのマーカー属性問題について
htkym
0
210
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.3k
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
460
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
230
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
52k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
250
BBQ
matthewcrist
89
10k
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