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
Adapting Design Patterns to a Multi Paradigmati...
Search
Lia Nemeth
April 17, 2018
Programming
0
49
Adapting Design Patterns to a Multi Paradigmatic World
How to adapt the classic GOF concepts to a multi paradigm language such as Python
Lia Nemeth
April 17, 2018
Tweet
Share
Other Decks in Programming
See All in Programming
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
320
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
210
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
280
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
570
Namespace and Its Future
tagomoris
6
700
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
250
🔨 小さなビルドシステムを作る
momeemt
3
670
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2k
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
120
Cache Me If You Can
ryunen344
2
630
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
140
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
19
11k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
How to Ace a Technical Interview
jacobian
279
23k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
For a Future-Friendly Web
brad_frost
180
9.9k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Transcript
Adapting Design Patterns to a Multi Paradigmatic World Lia Nemeth
The Gang of Four (GoF) Published in 1994 Inspired by
Christopher Alexander Patterns have: - Name - Problem - Solution - Consequences
These design patterns are not universal They are closely related
to languages such as C++ and Java ¨The choice of programming language is important because it influences one's point of view." (GoF, 1994)
But knowing reusable design elements can still be useful And
some patterns can be adapted for the multi-paradigmatic and dynamic nature of Python
Do not overdo it! Actual diagram from the book
Don't be object obsessed In 1994, Object Orientation was the
shiny new thing and this influenced the GoF book
Strategy Pattern A behavioral pattern that enables selecting an algorithm
at runtime
The Strategy pattern can be easily adapted to use functions
if they are first class elements of the language.
None
Observer Pattern Very useful pattern for event handling
First class functions are again the key to make this
pattern way simpler
None
None
None
Singleton is one of the most famous design patterns It's
a class that allows a single object to be instantiated
Alex Martelli proposes Borg instead of singleton. It can have
multiple objects, but they all share state
None
Some patterns like iterator and command are already embedded in
the language
None
Conclusion Patterns can be useful, they are a great way
to communicate an idea and getting to know them can bring good solutions to problems we face But always be cautious before blindly implementing them and think creatively on how they can be used
Thank you! Code at: github.com/lianemeth/design_patterns_talk