Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
530
Git 해부하기 2 + 3
buzzvil
0
51
Metastable Failure
buzzvil
0
270
Git 해부하기
buzzvil
0
63
Introduction to Plate Solving
buzzvil
0
53
Airbnb Minerva
buzzvil
0
400
Shape up 방법론
buzzvil
0
1k
Buzzvil Billing Data Pipeline
buzzvil
0
620
Journey of Dash's release-cycle
buzzvil
0
210
Other Decks in Programming
See All in Programming
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
0
160
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
GoLab2025 Recap
kuro_kurorrr
0
780
Implementation Patterns
denyspoltorak
0
110
Basic Architectures
denyspoltorak
0
100
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
530
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
150
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
Featured
See All Featured
KATA
mclloyd
PRO
33
15k
[SF Ruby Conf 2025] Rails X
palkan
0
560
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
400
The agentic SEO stack - context over prompts
schlessera
0
560
Color Theory Basics | Prateek | Gurzu
gurzu
0
150
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Chasing Engaging Ingredients in Design
codingconduct
0
84
Code Reviewing Like a Champion
maltzj
527
40k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
65
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
90
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
88
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
120
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