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
S.O.L.I.D. Python
Search
Eduardo Ferro Aldama
November 24, 2013
Technology
0
180
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
Tweet
Share
More Decks by Eduardo Ferro Aldama
See All by Eduardo Ferro Aldama
Golang design4concurrency
eferro
0
76
Python Herencia vs Composición (Luke soy tu padre)
eferro
0
190
Tdd/bdd prácticoaplicaciones con dominio rico
eferro
0
81
Mejor Framework PythonOO+SOLID. Vivir sin Frameworks
eferro
0
65
Other Decks in Technology
See All in Technology
なぜ今、コスト最適化(倹約)が必要なのか? ~AWSでのコスト最適化の進め方「目的編」~
htan
1
110
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
620
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
430
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
160
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
120
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
590
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
300
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.3k
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
170
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
180
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Facilitating Awesome Meetings
lara
57
6.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
65
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
30 Presentation Tips
portentint
PRO
1
210
For a Future-Friendly Web
brad_frost
182
10k
Paper Plane
katiecoart
PRO
0
46k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
250
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