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
75
Python Herencia vs Composición (Luke soy tu padre)
eferro
0
190
Tdd/bdd prácticoaplicaciones con dominio rico
eferro
0
79
Mejor Framework PythonOO+SOLID. Vivir sin Frameworks
eferro
0
65
Other Decks in Technology
See All in Technology
[2025年10月版] Databricks Data + AI Boot Camp
databricksjapan
1
250
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
9k
AI時代、“平均値”ではいられない
uhyo
8
2.4k
頭部ふわふわ浄酔器
uyupun
0
110
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
43k
ソースを読むプロセスの例
sat
PRO
15
9.9k
AI AgentをLangflowでサクッと作って、1日働かせてみた!
yano13
1
150
HonoとJSXを使って管理画面をサクッと型安全に作ろう
diggymo
0
170
個人でデジタル庁の デザインシステムをVue.jsで 作っている話
nishiharatsubasa
3
4.7k
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
170
Data Hubグループ 紹介資料
sansan33
PRO
0
2.2k
Implementing and Evaluating a High-Level Language with WasmGC and the Wasm Component Model: Scala’s Case
tanishiking
0
170
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
Practical Orchestrator
shlominoach
190
11k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
We Have a Design System, Now What?
morganepeng
53
7.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Faster Mobile Websites
deanohume
310
31k
Become a Pro
speakerdeck
PRO
29
5.6k
The Cult of Friendly URLs
andyhume
79
6.6k
The Invisible Side of Design
smashingmag
302
51k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Navigating Team Friction
lara
190
15k
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