Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Write S.O.L.I.D code
Search
Yoan
June 13, 2017
How-to & DIY
2
2.5k
Write S.O.L.I.D code
Learn how to write Object Oriented S.O.L.I.D code
Yoan
June 13, 2017
Tweet
Share
More Decks by Yoan
See All by Yoan
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
67
Clean Code du point de vue de la cognition
thirion
0
170
Agile Tech Coaching - The Missing Piece Of Your Organization
thirion
1
110
Cultiver l'intelligence collective à l'heure de ChatGPT
thirion
0
130
Clean Code from the Cognition Point of View
thirion
2
180
Xanpan - une méthode agile hybride centrée sur l'équipe
thirion
0
190
Les aventures d'un facilitateur au pays des techs - Agile Grenoble 2023
thirion
0
130
Clean Code du point de vue de la cognition
thirion
1
260
Les aventures d'un facilitateur au pays des techs - Agile Tour Lausanne 2022
thirion
0
190
Other Decks in How-to & DIY
See All in How-to & DIY
2025年03月02日 メイカーズながおかまつり での講演 「コミュニティベースでの製品開発ものづくりフェアの役割」
takasumasakazu
0
280
CH32Vシリーズを楽しもう(74thの場合) / enjoy ch32v series
74th
1
1.3k
2025版 鯖落ちパーツで安価に機械学習用マシンを作ってみる
bobfromjapan
0
460
JAWS-UG Community Upadate - JAWS-UG 熊本
awsjcpm
2
180
Nutanix Community Edition 超入門 25.04
ricefield66
0
200
GreenPAK 初心者向けハンズオン資料
aoisaya
2
730
ブロックテーマをゴリゴリに使い倒してサイトを作った話 / Kansai WordPress Meetup 2025 01 25
tbshiki
1
980
終わりのない会議を超えて:HolacracyのTactical Meetingを体験しよう!
andrearc
0
140
スマートハウスの蓄電性能の効率化を実現してみた~電気自動車編~
runrunsan
0
330
M5Stackサーバーを使って初代プレイステーションでuClinuxのカーネルを起動
kazueda
0
120
EmbeddingGemmaをDifyから使いたいけどAPI経由はつまらん #iotlt #gemma #dify
n0bisuke2
0
110
バッドプラクティスから学ぶハワイアン航空で行く re:Invent
kentosuzuki
0
440
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Facilitating Awesome Meetings
lara
57
6.7k
A designer walks into a library…
pauljervisheath
210
24k
Balancing Empowerment & Direction
lara
5
800
Scaling GitHub
holman
464
140k
Writing Fast Ruby
sferik
630
62k
Navigating Team Friction
lara
191
16k
A Tale of Four Properties
chriscoyier
162
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Transcript
@yot88 By yoan thirion S.O.L.I.D principles
@yot88 bad code / Good code Bad code vs Good
code Categorize each piece of code
None
@yot88 Singleton Tight Coupling Untestability Premature Optimization Indescriptive Naming Duplication
Single Responsibility Open/Closed Principle Liskov Substitution Interface Segregation Dependency Inversion Patterns and anti-patterns
@yot88 SRP A class should have only 1 responsibility
@yot88 Software entities should be open for extension, but closed
for modification. Open closed
@yot88 Subtypes must be substitutable for their base types. Liskov
substitution
@yot88 Clients should not be forced to depend on methods
that they do not use. Interface segregation
@yot88 High level modules should not depend on low level
modules : both should depend on abstractions. DI
@yot88 Good code / bad code Align each piece of
code with a S.O.L.I.D principle
1 3 3 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 13 16 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 4 2 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 15 14 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 8 6 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 11 9 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 10 5 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
12 1 3 16 13 2 4 14 15 6
8 9 12 5 10 11
1 3 16 13 2 4 14 15 6 8
9 12 5 10 11
@yot88 Let’s refactor using s.O.L.I.D
@yot88 exercises Practice S.O.L.I.D principles on code examples Clone the
repository at : https://github.com/ythirion/solid-kata Foreach code example : • identify why it’s breaking the given principle • Write down your refactoring strategy • Refactor it
@yot88 Where do you stand ? No quite yet On
the way Ready to roll