sivanagarajupachipulusu
157 views
58 slides
Jun 14, 2020
Slide 1 of 58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
About This Presentation
Design Patterns in Python.
Size: 8.73 MB
Language: en
Added: Jun 14, 2020
Slides: 58 pages
Slide Content
@PJUllrich - peterullrich.com
DESIGN PATTERNS IN PYTHON
BY PETER ULLRICH
RAW CODE
SOFTWARE DESIGN
SOFTWARE ARCHITECTURE
A SHORT
HISTORY
OF
SOFTWARE DESIGN
Christopher Alexander (Real-world Architect)253 - 1977
Image attribution: wikipedia.org
1994
GANG OF FOUR
Image attribution: wikipedia.org
23
Image attribution: wikipedia.org
WHAT IS A
DESIGN PATTERN
EXAMPLE DESIGN PATTERN
PROXY PATTERN
▸Problem
▸high-res images on website
▸Long loading time
▸Style images
▸Solution
▸Replace with placeholders
(proxies)
▸Style placeholders instead
EXAMPLE DESIGN PATTERN
PROXY PATTERN
▸Problem
▸high-res images on website
▸Long loading time
▸Style images
▸Solution
▸Replace with placeholders
(proxies)
▸Style placeholders instead
HOW TO USE
DESIGN PATTERNS
A SHORT STORY
Created with Storyboard That
ADAPTER
DESIGN PATTERN
DEMO
FACADE
DESIGN PATTERN
DEMO
OBSERVER
DESIGN PATTERN
DEMO
CRITICISM
DESIGN PATTERNS CAN BE
REPLACED WITH BUILT-IN
FUNCTIONALITY
John Doe
CRITICISM
CRITICISM
DESIGN PATTERNS CAN BE REPLACED WITH BUILT-IN FUNCTIONALITY
▸Yes and No
▸Some design patterns Yes
▸Iterator
▸Many Not
▸Facade, Adapter, …
DESIGN PATTERNS ARE MORE
FOR JAVA OR C#, NOT PYTHON
Jane Doe
CRITICISM
CRITICISM
DESIGN PATTERNS ARE MORE FOR JAVA OR C#
▸No
▸Certainly more prevalent in such fields
▸But also important in Python
▸Help get a more abstract understanding of software
▸Help create well structured software in less time
▸Offer a shared language to communicate
TAKE AWAYS
TAKE AWAYS
▸Have a look at Design Patterns
▸Study them, Forget them, Look them up when needed
▸You will write better software
▸More helpful (and necessary) the more senior you
become