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
S.O.L.I.D. Python
Search
Eduardo Ferro Aldama
November 24, 2013
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
S.O.L.I.D. Python
Presentación PyConES 2013 Madrid 24/11/2013 clean code,pycones,python,solid
Eduardo Ferro Aldama
November 24, 2013
More Decks by Eduardo Ferro Aldama
See All by Eduardo Ferro Aldama
Golang design4concurrency
eferro
0
87
Python Herencia vs Composición (Luke soy tu padre)
eferro
0
200
Tdd/bdd prácticoaplicaciones con dominio rico
eferro
0
88
Mejor Framework PythonOO+SOLID. Vivir sin Frameworks
eferro
0
74
Other Decks in Technology
See All in Technology
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
240
会社説明資料
persolserverworks
0
9.8k
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
100
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
WasmをRustにする
sansantech
PRO
0
250
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
110
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
230
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
110
大型犬好きによるPugの紹介
yamanoku
1
160
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
Technical Leadership for Architectural Decision Making
baasie
3
600
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
New Earth Scene 8
popppiees
4
2.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
The untapped power of vector embeddings
frankvandijk
2
1.9k
Making the Leap to Tech Lead
cromwellryan
135
10k
Transcript
S.O.L.I.D. Python
Alea Soluciones Bifer Team
@eferro @pasku1 @apa42 @nestorsalceda
Usual OO Systems Rigid Fragile Immobile Viscous
None
Why S.O.L.I.D. principles? To create easy to maintain OO systems
Improve reusability Easy testing
For creating Clean Code
It's all about money
None
S.O.L.I.D SRP - Single responsibility principle DIP - Dependency inversion
principle OCP - Open/closed principle LSP - Liskov substitution principle ISP - Interface segregation principle
Principles Not Rules
None
Car wash service car wash job when the car enters
in the car wash ✓ it registers a job customer notification when service completed ✓ it notifies the customer reporting when client report requested ✓ it shows all wash services for that customer 3 examples ran in 0.0178 seconds
None
None
None
None
… Some refactors / versions later
None
None
Depend upon Abstractions. Do not depend upon concretion
Compilation / Startup time dependency from <package> import module
Runtime dependency self.collaborator.message()
None
Global State Problem Implicit dependency problem Concrete API
No dependency injection Implicit dependency problem Concrete API
None
None
None
None
None
None
Duck Typing Approved!!!
None
Liskov Substitution principle violation
Python don't force type inheritance For API implementation (So, for
reuse code, prefer Composition)
Derived types must be completely substitutable for their base types
None
It isn't so important
A narrow interface is a better interface
SOLID Motivational Posters, by Derick Bailey http://lostechies.com/derickbailey/2009/02/11/solid-development-principles-in-motivational-pictures/
car_wash code example https://github.com/aleasoluciones/car_wash SOLID definition (at wikipedia) http://en.wikipedia.org/wiki/SOLID_(object-oriented_design) Getting
a SOLID start (Uncle Bob) http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod Video SOLID Object Oriented Design (Sandi Metz) http://www.confreaks.com/videos/240-goruco2009-solid-object-oriented-design
None
None
Thanks !!! @eferro @pasku1 @apa42 @nestorsalceda