Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Clean Architecture
Search
Buzzvil
April 18, 2018
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Clean Architecture
By Yohan
Buzzvil
April 18, 2018
More Decks by Buzzvil
See All by Buzzvil
220903_GFS
buzzvil
0
740
Git 해부하기 2 + 3
buzzvil
0
82
Metastable Failure
buzzvil
0
440
Git 해부하기
buzzvil
0
110
Introduction to Plate Solving
buzzvil
0
99
Airbnb Minerva
buzzvil
0
630
Shape up 방법론
buzzvil
0
1.2k
Buzzvil Billing Data Pipeline
buzzvil
0
790
Journey of Dash's release-cycle
buzzvil
0
340
Other Decks in Programming
See All in Programming
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
240
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.4k
Crash Auto Pipelines
veronikapj
1
390
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
630
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
540
Next.js: The final boss of Web Performance
guaca
0
390
SODA - FACT BOOK(JP)
sodainc
1
40k
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
290
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
360
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
SODA - FACT BOOK(EN)
sodainc
1
210
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
240
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
320
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
670
The Invisible Side of Design
smashingmag
301
52k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
350
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
290
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Documentation Writing (for coders)
carmenintech
77
5.6k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
3
1.2k
Faster Mobile Websites
deanohume
310
32k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
890
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
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