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.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
More Decks by Yoan
See All by Yoan
Coder sans se noyer dans la complexité
thirion
0
160
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
150
Clean Code du point de vue de la cognition
thirion
0
220
Agile Tech Coaching - The Missing Piece Of Your Organization
thirion
1
160
Cultiver l'intelligence collective à l'heure de ChatGPT
thirion
0
170
Clean Code from the Cognition Point of View
thirion
2
250
Xanpan - une méthode agile hybride centrée sur l'équipe
thirion
0
250
Les aventures d'un facilitateur au pays des techs - Agile Grenoble 2023
thirion
0
170
Clean Code du point de vue de la cognition
thirion
1
310
Other Decks in How-to & DIY
See All in How-to & DIY
EXPO 2025 大屋根リングをぐるっと周回! 【GPSマルチユニット×ソラカメ実験】
scbc1167
0
140
Azure PortalのQoLを上げてたら Big Techに怒られた
horihiro
2
610
Linuxが動く自作SBCを作る話.pdf
daimiya
0
720
おっきなガジェットの回線事情
2bo
1
220
フィールドエンジニア at 多摩川 / Field Engineer at Tamagawa
aokiplayer
0
330
Node-REDで制御できるエッジカメラのreCameraを触る #iotlt #JLCPCB #recamera
n0bisuke2
0
190
大量のiOSシミュレータにアプリをインストールする
gurrium
0
140
从机器人竞赛到软件系统实践:日本创客文化对技术创新的启
takasumasakazu
0
110
JAWS-UG/AWSコミュニティ -JAWS-UGくまもと#16
awsjcpm
1
240
Goカードゲームを 作ってみた!
senoue
0
270
MustをWillに変える技術 〜アイドル・郁田はるきが"すべき"の壁を超えるまで〜
subroh0508
1
2k
スマートハウスの蓄電性能の効率化を実現してみた~電気自動車編~
runrunsan
0
520
Featured
See All Featured
Crafting Experiences
bethany
1
210
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
260
Automating Front-end Workflow
addyosmani
1370
210k
Ethics towards AI in product and experience design
skipperchong
2
330
The Pragmatic Product Professional
lauravandoore
37
7.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
170
Unsuck your backbone
ammeep
672
58k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
Typedesign – Prime Four
hannesfritz
42
3.1k
Making Projects Easy
brettharned
120
6.7k
Building an army of robots
kneath
306
46k
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