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 Paradigmatic World
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
App Router への移行は「改善」となり得るのか?/ Can migration to App Router be an improvement
takefumiyoshii
1
110
Building a Smaller App Binary
kateinoigakukun
2
200
フロントエンドパフォーマンス 入門
shouta2
7
1.5k
htmx is fun!
codehex
2
190
TDDと今まで
kanayannet
0
140
TCA魔法学入門🪄
dazy
0
280
Ruby製社内ツールのGo移行
bgpat
2
260
ここ1~2年くらいで 使えるようになった(主要ブラウザーの最新版 がすべて対応した ) ウェブの新機能について ランダムに喋る!
myzkyy
9
6.4k
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
480
document.write再考
brn
5
2.5k
phpunit/php-code-coverageって何をしてるんだ #phperkaigi
o0h
PRO
2
210
孤独のCTOグルメという やや奇抜な企画をやった目的と効果
shoheimitani
3
1k
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
14
1.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
319
20k
Side Projects
sachag
451
41k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
11
1.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
For a Future-Friendly Web
brad_frost
170
8.9k
Build your cross-platform service in a week with App Engine
jlugia
223
17k
Code Reviewing Like a Champion
maltzj
512
39k
Mobile First: as difficult as doing things right
swwweet
215
8.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
319
23k
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