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
Write S.O.L.I.D code
Search
Yoan
June 13, 2017
How-to & DIY
2.6k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Write S.O.L.I.D code
Learn how to write Object Oriented S.O.L.I.D code
Yoan
June 13, 2017
Transcript
22 slides
@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
More Decks by Yoan
See All by Yoan
Coder sans se noyer dans la complexité
thirion
0
200
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
200
Clean Code du point de vue de la cognition
thirion
0
250
Agile Tech Coaching - The Missing Piece Of Your Organization
thirion
1
190
Cultiver l'intelligence collective à l'heure de ChatGPT
thirion
0
210
Clean Code from the Cognition Point of View
thirion
2
280
Xanpan - une méthode agile hybride centrée sur l'équipe
thirion
0
280
Les aventures d'un facilitateur au pays des techs - Agile Grenoble 2023
thirion
0
200
Clean Code du point de vue de la cognition
thirion
1
340
Other Decks in How-to & DIY
See All in How-to & DIY
How to Stylus 20251031
hareyakayuruyaka
0
200
Kernel/VM探検隊@関西 12回目 イベント会場から懇親会会場までの道のりマップ
fadis
0
130
とある地方技術勉強会に集うエンジニアたちのこれまでとこれから
pharaohkj
1
240
決まらない会議を卒業しよう 意思決定を進化させるワークショップ
andrearc
0
300
グローバルチームでなんとかしがみつく英語コミュニケーション
yatsu
0
130
JAWS SONIC & MIDNIGHT JAWS 2026 - GenAIが実現したAWS環境でのコミュニティデータ取得
awsjcpm
1
120
進捗報告 + 開発の連鎖
tanakamasayuki
1
550
多摩.dev で草を食べる話をしたら カンファレンスに登壇していた / from-eating-weeds-to-a-conference
aokiplayer
1
910
[JAWS DAYS 2026 | Track B] Local Roots, Global Reach
awsjcpm
0
180
LLMを「機能」として組み込む技術:「Figma to はてなCMS」におけるプロンプトエンジニアリングからAIエージェント構築にわたる精度向上の軌跡
nanimonodemonai
0
650
電子線香で老人を救え
izawa
0
120
4,8 sur 154 avis ou 5,0 sur 6 avis : quel institut de beauté choisir ?
radinscoquets
0
140
Featured
See All Featured
Visualization
eitanlees
153
17k
How to train your dragon (web standard)
notwaldorf
96
6.9k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
So, you think you're a good person
axbom
PRO
2
2.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
60k
The Limits of Empathy - UXLibs8
cassininazir
2
780
Embracing the Ebb and Flow
colly
88
5.2k
Leo the Paperboy
mayatellez
11
2.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k