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
Write S.O.L.I.D code
Search
Yoan
June 13, 2017
How-to & DIY
2.5k
2
Share
Write S.O.L.I.D code
Learn how to write Object Oriented S.O.L.I.D code
Yoan
June 13, 2017
More Decks by Yoan
See All by Yoan
Coder sans se noyer dans la complexité
thirion
0
83
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
130
Clean Code du point de vue de la cognition
thirion
0
200
Agile Tech Coaching - The Missing Piece Of Your Organization
thirion
1
150
Cultiver l'intelligence collective à l'heure de ChatGPT
thirion
0
160
Clean Code from the Cognition Point of View
thirion
2
220
Xanpan - une méthode agile hybride centrée sur l'équipe
thirion
0
230
Les aventures d'un facilitateur au pays des techs - Agile Grenoble 2023
thirion
0
160
Clean Code du point de vue de la cognition
thirion
1
300
Other Decks in How-to & DIY
See All in How-to & DIY
EjecTea 2026 / 20260228-osc26tk-ejectea
akkiesoft
0
890
とある地方技術勉強会に集うエンジニアたちのこれまでとこれから
pharaohkj
1
150
Node-REDでセンサーなどから起動させるカメラノードを作ったよ IoTLT vol123 #iotlt
n0bisuke2
0
150
人を補助するAI ~AIとの壁打ちがきっかけになる~ #共創AIミートアップ
ishikiemo
2
570
ModuleLLM、最前線!
anoken
1
340
『いってらっしゃい』と『お帰りなさい』を言ってくれる『ぬい』 に動きをつけてみた!
scbc1167
0
110
251011「ひとりより、みんなで!」 九州の支部で始めた、新しい連携のかたち
east_takumi
2
150
EmbeddingGemmaをDifyから使いたいけどAPI経由はつまらん #iotlt #gemma #dify
n0bisuke2
0
190
ネガティブをねじ伏せ、n=1のキャリアに変える技術
subroh0508
1
1.2k
あなたは何故コミュニティに参加するのか?
awsjcpm
2
320
How to Stylus 20251031
hareyakayuruyaka
0
130
スイングやカードをいい感じに立てるスタンドの話
niccolli
1
450
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Accessibility Awareness
sabderemane
1
110
How to make the Groovebox
asonas
2
2.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
780
Navigating Weather and Climate Data
rabernat
0
190
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
230
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
170
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
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