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
Goodbye ShellScript, Hello File-based App
shunsock
0
660
.NET WebAssemblyで実現するクライアントサイドAI推論:NuGetからViteまで、2つのエコシステムを繋ぐビルド戦略
yamachu
1
450
AIに賢く動いてもらうためのコンテキスト〜Snowflake女子会 vol.8
snowwmn0824
0
150
What the customer really needed
kawaguti
PRO
3
220
LLMに渡さなかった仕事
nanaism
0
1.3k
30座EKS, 180次升級淬煉的EKS Upgrade Skill 的歷程
eric8230
0
210
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
140
アクセスキーこわい やめかたと漏らさない工夫
sassssan68
1
610
Making AI Agents Safe and Fast- Jev, Obsidian, and the Meta-Harness
x5gtrn
PRO
0
110
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
190
Vibe Coding で作ったプロダクトをどう安全に動かすか / How to Safely Run Products Built with Vibe Coding
glidenote
0
470
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
4
690
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
530
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Discover your Explorer Soul
emna__ayadi
2
1.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
Crafting Experiences
bethany
1
350
Facilitating Awesome Meetings
lara
57
7.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Building an army of robots
kneath
307
46k
sira's awesome portfolio website redesign presentation
elsirapls
0
420
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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