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
720
Git 해부하기 2 + 3
buzzvil
0
78
Metastable Failure
buzzvil
0
420
Git 해부하기
buzzvil
0
100
Introduction to Plate Solving
buzzvil
0
98
Airbnb Minerva
buzzvil
0
610
Shape up 방법론
buzzvil
0
1.1k
Buzzvil Billing Data Pipeline
buzzvil
0
760
Journey of Dash's release-cycle
buzzvil
0
320
Other Decks in Programming
See All in Programming
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
すこし踏み込む CancellationToken
htkym
2
1.7k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Workers Cache を知る
syumai
0
360
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
900
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.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