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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
77
Python Herencia vs Composición (Luke soy tu padre)
eferro
0
190
Tdd/bdd prácticoaplicaciones con dominio rico
eferro
0
82
Mejor Framework PythonOO+SOLID. Vivir sin Frameworks
eferro
0
67
Other Decks in Technology
See All in Technology
Copilot 宇宙へ 〜生成AIで「専門データの壁」を壊す方法〜
nakasho
0
190
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
130
Navigation APIと見るSvelteKitのWeb標準志向
yamanoku
2
110
20年以上続く PHP 大規模プロダクトを Kubernetes へ ── クラウド基盤刷新プロジェクトの4年間
oogfranz
PRO
0
240
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
130
やさしいとこから始めるGitHubリポジトリのセキュリティ
tsubakimoto_s
0
620
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
qa
0
280
俺の/私の最強アーキテクチャ決定戦開催 ― チームで新しいアーキテクチャに適合していくために / 20260322 Naoki Takahashi
shift_evolve
PRO
1
440
品質を経営にどう語るか #jassttokyo / Communicating the Strategic Value of Quality to Executive Leadership
kyonmm
PRO
3
1.2k
モジュラモノリス導入から4年間の総括:アーキテクチャと組織の相互作用について / Architecture and Organizational Interaction
nazonohito51
6
3k
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
120
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
2
260
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
150
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
ラッコキーワード サービス紹介資料
rakko
1
2.7M
For a Future-Friendly Web
brad_frost
183
10k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Fireside Chat
paigeccino
42
3.8k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
52k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
410
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