﻿1
00:00:00,880 --> 00:00:02,990
[Music]

2
00:00:02,990 --> 00:00:05,839
which if I pronounced it right a

3
00:00:05,839 --> 00:00:09,119
one-stage thank you thank you very much

4
00:00:09,119 --> 00:00:10,308
[Music]

5
00:00:10,308 --> 00:00:12,509
all right it's good morning everyone

6
00:00:12,509 --> 00:00:15,449
I hope I don't breathe into the

7
00:00:15,449 --> 00:00:17,489
microphone but well good morning

8
00:00:17,489 --> 00:00:17,820
everyone

9
00:00:17,820 --> 00:00:20,309
thanks a lot for having me my name is

10
00:00:20,309 --> 00:00:22,710
Peter I'm a computer science master

11
00:00:22,710 --> 00:00:24,778
student from the Netherlands and my

12
00:00:24,778 --> 00:00:27,000
education focused a lot on software

13
00:00:27,000 --> 00:00:29,160
design and architecture in the past year

14
00:00:29,160 --> 00:00:31,949
and I became quite passionate about this

15
00:00:31,949 --> 00:00:34,109
topic because it allows you to go from

16
00:00:34,109 --> 00:00:38,579
raw code that is unclear and right in

17
00:00:38,579 --> 00:00:40,738
front of your face to more abstract

18
00:00:40,738 --> 00:00:43,439
terms so here for example we use very

19
00:00:43,439 --> 00:00:46,079
easy UML or just a very standard

20
00:00:46,079 --> 00:00:48,659
modeling to model a system that has an

21
00:00:48,659 --> 00:00:52,079
API some logic a model an SDK and that

22
00:00:52,079 --> 00:00:54,238
communicates with the outside world so

23
00:00:54,238 --> 00:00:56,640
if you take your code and you put it in

24
00:00:56,640 --> 00:00:58,229
such a model you immediately see how

25
00:00:58,229 --> 00:01:00,359
your system works how it interacts and

26
00:01:00,359 --> 00:01:03,320
most importantly you will also see

27
00:01:03,320 --> 00:01:06,180
disadvantages or security flaws and

28
00:01:06,180 --> 00:01:08,790
there's a software design when it's more

29
00:01:08,790 --> 00:01:10,799
a code level and then you have software

30
00:01:10,799 --> 00:01:12,750
architecture that is more on a

31
00:01:12,750 --> 00:01:14,549
structural level so you can for example

32
00:01:14,549 --> 00:01:17,519
model how how many api service we have

33
00:01:17,519 --> 00:01:18,989
for that you have a load balance in

34
00:01:18,989 --> 00:01:21,540
between and how you connect to the

35
00:01:21,540 --> 00:01:22,950
database and these kind of things so

36
00:01:22,950 --> 00:01:25,019
that's how you model more your whole

37
00:01:25,019 --> 00:01:29,099
system so these two topics became quite

38
00:01:29,099 --> 00:01:31,769
important to me and I would like to give

39
00:01:31,769 --> 00:01:33,569
you a very short history of design

40
00:01:33,569 --> 00:01:36,060
patterns of software design namely

41
00:01:36,060 --> 00:01:39,780
software design wasn't didn't come from

42
00:01:39,780 --> 00:01:41,790
actual software engineering but it came

43
00:01:41,790 --> 00:01:44,188
from real-world architecting so really

44
00:01:44,188 --> 00:01:46,649
building buildings and this man

45
00:01:46,649 --> 00:01:50,250
Christopher Alexander he was so to say

46
00:01:50,250 --> 00:01:53,909
the founder for something that is called

47
00:01:53,909 --> 00:01:56,670
at the pattern language so he wrote this

48
00:01:56,670 --> 00:02:00,209
book in 1977 and he actually in this

49
00:02:00,209 --> 00:02:04,159
book proposed 253 design patterns for

50
00:02:04,159 --> 00:02:06,959
real world architects so when you want

51
00:02:06,959 --> 00:02:08,669
to build a building you don't have to

52
00:02:08,669 --> 00:02:10,340
reinvent the wheel

53
00:02:10,340 --> 00:02:11,870
you don't have to think whether you put

54
00:02:11,870 --> 00:02:15,050
the dining room next to the kitchen or

55
00:02:15,050 --> 00:02:16,370
next to the bathroom these kind of

56
00:02:16,370 --> 00:02:18,620
things when you want to think about what

57
00:02:18,620 --> 00:02:20,300
kind of interior you need for a certain

58
00:02:20,300 --> 00:02:24,318
room or what kind of kind of styles work

59
00:02:24,318 --> 00:02:26,840
nicely together u.s. real word architect

60
00:02:26,840 --> 00:02:28,549
can go back to this book just have a

61
00:02:28,549 --> 00:02:30,979
look at it and pick your design patterns

62
00:02:30,979 --> 00:02:33,409
out of that book and this pattern

63
00:02:33,409 --> 00:02:34,870
language actually became quite

64
00:02:34,870 --> 00:02:37,189
interesting also for other fields for

65
00:02:37,189 --> 00:02:39,289
example software engineering and these

66
00:02:39,289 --> 00:02:42,500
four authors they were became known as

67
00:02:42,500 --> 00:02:43,280
the Gang of Four

68
00:02:43,280 --> 00:02:45,199
those were the first authors of the

69
00:02:45,199 --> 00:02:47,090
first people in software engineering who

70
00:02:47,090 --> 00:02:50,000
used the design language in software

71
00:02:50,000 --> 00:02:52,818
engineering and this book in 1994 was

72
00:02:52,818 --> 00:02:55,639
the very first milestone on well book

73
00:02:55,639 --> 00:02:59,120
milestone in this area and in this book

74
00:02:59,120 --> 00:03:01,128
they proposed 23 different design

75
00:03:01,128 --> 00:03:02,989
patterns and they are still used today

76
00:03:02,989 --> 00:03:05,959
and they are language independent where

77
00:03:05,959 --> 00:03:07,519
they use Python or something else you

78
00:03:07,519 --> 00:03:09,469
will always mostly use these design

79
00:03:09,469 --> 00:03:12,979
patterns let's list actually got

80
00:03:12,979 --> 00:03:16,129
extended now by different people it's

81
00:03:16,129 --> 00:03:18,199
around forty forty design panels now you

82
00:03:18,199 --> 00:03:19,609
can find them on Wikipedia if you want

83
00:03:19,609 --> 00:03:22,759
to look up all of them but you might

84
00:03:22,759 --> 00:03:24,590
actually ask here so what's actually a

85
00:03:24,590 --> 00:03:27,169
design pattern you're all practical

86
00:03:27,169 --> 00:03:28,789
people so let let me give you a

87
00:03:28,789 --> 00:03:31,310
practical example of the proxy pattern

88
00:03:31,310 --> 00:03:34,459
so you have a problem so a design

89
00:03:34,459 --> 00:03:36,439
pattern in general it's always about a

90
00:03:36,439 --> 00:03:38,598
very general problem and it explains

91
00:03:38,598 --> 00:03:40,729
that problem and then it offers a very

92
00:03:40,729 --> 00:03:43,939
general solution to that problem and you

93
00:03:43,939 --> 00:03:45,889
can then implement a customized version

94
00:03:45,889 --> 00:03:47,780
of that about that pattern in your code

95
00:03:47,780 --> 00:03:50,840
so well our problem is that you have

96
00:03:50,840 --> 00:03:53,689
high resolution images on a website and

97
00:03:53,689 --> 00:03:56,479
because when a customer comes to your

98
00:03:56,479 --> 00:03:58,579
website he or she has to load all of

99
00:03:58,579 --> 00:04:01,609
these images at once so you have a long

100
00:04:01,609 --> 00:04:03,789
loading time it takes a long time and

101
00:04:03,789 --> 00:04:06,318
you also want to be able to style these

102
00:04:06,318 --> 00:04:09,409
images so the problem is basically the

103
00:04:09,409 --> 00:04:12,859
long loading time so if you look the if

104
00:04:12,859 --> 00:04:15,049
you look at the proxy pattern then the

105
00:04:15,049 --> 00:04:16,519
solution offered is that you simply

106
00:04:16,519 --> 00:04:20,139
replace these images with placeholders

107
00:04:20,139 --> 00:04:22,300
and whenever and you can play style

108
00:04:22,300 --> 00:04:24,519
these placeholders and then whenever a

109
00:04:24,519 --> 00:04:26,829
user comes to that part of your website

110
00:04:26,829 --> 00:04:29,050
you load them down it dynamically so you

111
00:04:29,050 --> 00:04:31,089
download all the web images in the

112
00:04:31,089 --> 00:04:33,610
beginning but then over the time when

113
00:04:33,610 --> 00:04:36,218
they use any needs them then you load

114
00:04:36,218 --> 00:04:40,240
the image and if you look at the if you

115
00:04:40,240 --> 00:04:43,269
look at it in in UML a little bit that's

116
00:04:43,269 --> 00:04:44,769
how you would implement a proxy pattern

117
00:04:44,769 --> 00:04:48,579
so you have an image proxy let's ponder

118
00:04:48,579 --> 00:04:52,329
see if those image foxy both of them an

119
00:04:52,329 --> 00:04:54,370
image proxy and an actual image the

120
00:04:54,370 --> 00:04:56,168
image proxy holds the CSS and a

121
00:04:56,168 --> 00:04:57,939
connection to the actual image that

122
00:04:57,939 --> 00:05:00,639
holds like a file path or something else

123
00:05:00,639 --> 00:05:03,610
a ul to the actual image it's just an

124
00:05:03,610 --> 00:05:05,468
example when you want when you will

125
00:05:05,468 --> 00:05:07,990
implement the proxy pattern in your code

126
00:05:07,990 --> 00:05:09,490
it will actually look differently but

127
00:05:09,490 --> 00:05:11,168
that's in general terms how you would do

128
00:05:11,168 --> 00:05:16,709
it so that is a design pattern we now

129
00:05:16,709 --> 00:05:19,028
let me give you a little example of how

130
00:05:19,028 --> 00:05:21,218
you can actually use design patterns and

131
00:05:21,218 --> 00:05:23,560
I made a little comic story about this

132
00:05:23,560 --> 00:05:26,288
and I hope you like it so this is evil

133
00:05:26,288 --> 00:05:30,519
overlord and as well evil overlords he

134
00:05:30,519 --> 00:05:32,079
obviously wants to take over the world

135
00:05:32,079 --> 00:05:34,120
he wants to control everybody any things

136
00:05:34,120 --> 00:05:35,800
well people are a lot in front of their

137
00:05:35,800 --> 00:05:36,879
smartphones and they're kind of

138
00:05:36,879 --> 00:05:38,740
controlled by the smartphones so if I

139
00:05:38,740 --> 00:05:40,269
just control the smartphones I can

140
00:05:40,269 --> 00:05:42,399
control the world so he goes to his

141
00:05:42,399 --> 00:05:44,139
little toys minion in his dungeon

142
00:05:44,139 --> 00:05:46,718
and he says create three updates which

143
00:05:46,718 --> 00:05:48,728
gives me pseudo rights over iPhone users

144
00:05:48,728 --> 00:05:50,978
because he wants to start there and the

145
00:05:50,978 --> 00:05:53,139
minion obviously obeys he gets the

146
00:05:53,139 --> 00:05:55,778
updates he goes to the iPhone users he

147
00:05:55,778 --> 00:05:57,718
makes him update his malicious update

148
00:05:57,718 --> 00:06:01,709
but once the iPhone users have it the

149
00:06:01,709 --> 00:06:04,149
Android users show up and they're like

150
00:06:04,149 --> 00:06:06,639
man these nasty iPhone users with a

151
00:06:06,639 --> 00:06:08,949
fancy features and everything we also

152
00:06:08,949 --> 00:06:11,968
want that update ins give us the update

153
00:06:11,968 --> 00:06:14,468
say says ok I will do that he goes back

154
00:06:14,468 --> 00:06:16,899
to his dungeon and ask us meaning well

155
00:06:16,899 --> 00:06:19,449
give me seven updates to control the

156
00:06:19,449 --> 00:06:21,759
Android users and the mini says well

157
00:06:21,759 --> 00:06:23,680
it's a reflect today but we all know

158
00:06:23,680 --> 00:06:25,088
it's not that important to your factor

159
00:06:25,088 --> 00:06:27,779
is it yes I will get right to it

160
00:06:27,779 --> 00:06:30,300
he makes the up the Android users also

161
00:06:30,300 --> 00:06:32,220
update their phones with a malicious

162
00:06:32,220 --> 00:06:34,050
update but then all of a sudden they're

163
00:06:34,050 --> 00:06:36,449
in a Windows Phone user shop and we're

164
00:06:36,449 --> 00:06:39,360
like well would you mind developing this

165
00:06:39,360 --> 00:06:42,240
update for Windows Phone as well and we

166
00:06:42,240 --> 00:06:43,470
all know it's a little bit hard to

167
00:06:43,470 --> 00:06:45,329
develop for Windows Phone sees like

168
00:06:45,329 --> 00:06:50,250
total despair no and one eternity later

169
00:06:50,250 --> 00:06:52,439
he finally creates the update

170
00:06:52,439 --> 00:06:54,720
everybody's almost dead and people

171
00:06:54,720 --> 00:06:56,339
Windows Phone users are like well thank

172
00:06:56,339 --> 00:06:58,470
you very much they install the update

173
00:06:58,470 --> 00:07:03,418
well poof they're gone thank you all

174
00:07:03,418 --> 00:07:05,668
right that's a lean introduction but a

175
00:07:05,668 --> 00:07:08,550
little sure story here and now actually

176
00:07:08,550 --> 00:07:10,860
the Overlord he has this malicious

177
00:07:10,860 --> 00:07:13,800
update on all the phones but he actually

178
00:07:13,800 --> 00:07:17,189
has a problem because you see he has

179
00:07:17,189 --> 00:07:18,720
three different groups of people and

180
00:07:18,720 --> 00:07:21,209
they speak different languages so elvish

181
00:07:21,209 --> 00:07:23,579
for example - or fish and the humans

182
00:07:23,579 --> 00:07:25,319
speak Swedish and his language is

183
00:07:25,319 --> 00:07:29,310
English so whenever he wants to call

184
00:07:29,310 --> 00:07:31,918
when he wants to send a command so to

185
00:07:31,918 --> 00:07:33,779
say to one of these groups he has used

186
00:07:33,779 --> 00:07:36,689
either either elfish dwarfish or Swedish

187
00:07:36,689 --> 00:07:38,759
and he has to translate that first from

188
00:07:38,759 --> 00:07:40,649
his English language so you have to a

189
00:07:40,649 --> 00:07:42,860
lot of you have to customize a lot and

190
00:07:42,860 --> 00:07:46,439
he looks into his book of gamma 4 and he

191
00:07:46,439 --> 00:07:48,750
sees the adapter design pattern Yuri

192
00:07:48,750 --> 00:07:50,339
allows it because with the adapter

193
00:07:50,339 --> 00:07:52,470
pattern you can just simply add another

194
00:07:52,470 --> 00:07:55,160
class and adapter class in front of your

195
00:07:55,160 --> 00:07:58,918
minion class Jose and you will do the

196
00:07:58,918 --> 00:08:01,680
translation in that adapter class so you

197
00:08:01,680 --> 00:08:03,449
just have to call you have you have to

198
00:08:03,449 --> 00:08:07,079
as a one unique command that you can

199
00:08:07,079 --> 00:08:08,639
call on the adapter and the adapter will

200
00:08:08,639 --> 00:08:11,519
translate for you I will just show you

201
00:08:11,519 --> 00:08:13,918
because I it's my first dog and I heard

202
00:08:13,918 --> 00:08:15,449
from a lot of people that it's a great

203
00:08:15,449 --> 00:08:18,089
thing to do a live demo yeah that's

204
00:08:18,089 --> 00:08:20,399
always a great idea it works for lousy

205
00:08:20,399 --> 00:08:23,668
so I created these example classes I

206
00:08:23,668 --> 00:08:26,038
hope you can see that you have some like

207
00:08:26,038 --> 00:08:29,519
else some dwarfs and humans and all of

208
00:08:29,519 --> 00:08:31,379
them have kind of the same commands it

209
00:08:31,379 --> 00:08:33,509
is actually translated from the English

210
00:08:33,509 --> 00:08:36,000
call me apparently to the Internet in

211
00:08:36,000 --> 00:08:38,519
elvish it's known in and dwarfish it's

212
00:08:38,519 --> 00:08:41,460
astronaut oh and in Swedish it's a

213
00:08:41,460 --> 00:08:44,970
me pronounce it and kinda correctly and

214
00:08:44,970 --> 00:08:46,500
you see it's kind of a same command but

215
00:08:46,500 --> 00:08:48,929
you have different names for it and what

216
00:08:48,929 --> 00:08:51,059
you could do was that what the overlord

217
00:08:51,059 --> 00:08:53,399
could do you iterate over all you in a

218
00:08:53,399 --> 00:08:55,200
minions and then you check every time

219
00:08:55,200 --> 00:08:57,389
okay if it's a if it's an elf I will

220
00:08:57,389 --> 00:08:59,279
call this function if it's a dwarf I

221
00:08:59,279 --> 00:09:00,809
will call another function otherwise I

222
00:09:00,809 --> 00:09:04,049
call the default function so to say but

223
00:09:04,049 --> 00:09:06,480
I mean everybody I think you spot

224
00:09:06,480 --> 00:09:07,860
already the problem here because if you

225
00:09:07,860 --> 00:09:11,250
add any other minion groups like L like

226
00:09:11,250 --> 00:09:14,879
trolls and orcs then you have to create

227
00:09:14,879 --> 00:09:16,830
more and more of these else if

228
00:09:16,830 --> 00:09:18,389
statements and it just gets longer

229
00:09:18,389 --> 00:09:19,950
longer and it's hard coded which we

230
00:09:19,950 --> 00:09:22,559
don't like so when we use the adapter

231
00:09:22,559 --> 00:09:25,230
pattern we can actually create an

232
00:09:25,230 --> 00:09:27,360
adapter for each of these groups so we

233
00:09:27,360 --> 00:09:29,789
have an elf adapted rorf adapter and a

234
00:09:29,789 --> 00:09:32,009
human adapter and they all like they all

235
00:09:32,009 --> 00:09:33,990
look quite the same you just when they

236
00:09:33,990 --> 00:09:35,460
you create them you hands on a minion

237
00:09:35,460 --> 00:09:37,350
object that you want to adapt and they

238
00:09:37,350 --> 00:09:39,779
all have the same function which is a

239
00:09:39,779 --> 00:09:42,690
call me function and the elf one called

240
00:09:42,690 --> 00:09:45,210
Nolan and the dwarf one called this one

241
00:09:45,210 --> 00:09:47,850
and the humans calling me so you create

242
00:09:47,850 --> 00:09:50,309
an adapter for every group but then

243
00:09:50,309 --> 00:09:53,610
again it works yeah you can iterate over

244
00:09:53,610 --> 00:09:55,379
the minions and you only have to call

245
00:09:55,379 --> 00:09:58,139
one single function and adapter takes

246
00:09:58,139 --> 00:10:01,289
care for you and it works but again you

247
00:10:01,289 --> 00:10:02,820
see the problem whenever we want to

248
00:10:02,820 --> 00:10:04,710
create another group you have to create

249
00:10:04,710 --> 00:10:08,429
another adapter as well so what if we

250
00:10:08,429 --> 00:10:11,220
just use a very general adapter class

251
00:10:11,220 --> 00:10:13,230
for any minion and that's a little bit

252
00:10:13,230 --> 00:10:14,549
complicated but I will walk you through

253
00:10:14,549 --> 00:10:16,860
it it's just a meaning that doesn't

254
00:10:16,860 --> 00:10:18,240
matter whether in hell for dwarf and

255
00:10:18,240 --> 00:10:21,360
it's same you create a you personal and

256
00:10:21,360 --> 00:10:23,429
minion object and you also pass and some

257
00:10:23,429 --> 00:10:25,980
adapted methods and you can create any

258
00:10:25,980 --> 00:10:27,929
you can pass on any method you want to

259
00:10:27,929 --> 00:10:32,100
adapt so we have the wing make function

260
00:10:32,100 --> 00:10:34,679
for example we can hand this in here and

261
00:10:34,679 --> 00:10:37,799
then you just iterate over them you get

262
00:10:37,799 --> 00:10:41,000
that function from the actual object and

263
00:10:41,000 --> 00:10:45,299
you set it onto the adapter find a class

264
00:10:45,299 --> 00:10:48,419
object with the new sort of a name with

265
00:10:48,419 --> 00:10:50,250
a new key so you take the wing make

266
00:10:50,250 --> 00:10:52,919
function and you register it on the

267
00:10:52,919 --> 00:10:53,840
adapter

268
00:10:53,840 --> 00:10:55,970
with a new name so you can call it under

269
00:10:55,970 --> 00:11:00,500
a new name and the and I do this here so

270
00:11:00,500 --> 00:11:02,299
I create for example a minion adapter

271
00:11:02,299 --> 00:11:05,330
for an elf and I say that I want to have

272
00:11:05,330 --> 00:11:07,639
a Call Me function and that should be

273
00:11:07,639 --> 00:11:10,070
the non in function on the elf object

274
00:11:10,070 --> 00:11:12,320
and I can do the same for the trough and

275
00:11:12,320 --> 00:11:15,110
the humans and then I can simply again

276
00:11:15,110 --> 00:11:17,870
just iterate over them and say and call

277
00:11:17,870 --> 00:11:20,750
the call me function but another cool

278
00:11:20,750 --> 00:11:23,779
thing about this adapter is that you can

279
00:11:23,779 --> 00:11:26,539
still get and set any attribute any

280
00:11:26,539 --> 00:11:28,610
variable any function on the actual

281
00:11:28,610 --> 00:11:30,590
object on the actual minion object and

282
00:11:30,590 --> 00:11:33,379
you don't set it on the adapter but on

283
00:11:33,379 --> 00:11:35,000
the actual object so also at one time

284
00:11:35,000 --> 00:11:37,159
you can just rip out the adapter and you

285
00:11:37,159 --> 00:11:39,169
still hold the object with all the

286
00:11:39,169 --> 00:11:41,419
attributes set so this is what you would

287
00:11:41,419 --> 00:11:44,990
do with the with the get and set so this

288
00:11:44,990 --> 00:11:46,610
code actually I think will be online

289
00:11:46,610 --> 00:11:49,070
afterwards so you can just look at it in

290
00:11:49,070 --> 00:11:51,889
peace at home but when we run this we

291
00:11:51,889 --> 00:11:55,940
actually see that okay all that else you

292
00:11:55,940 --> 00:11:58,279
they call home and the humans at the

293
00:11:58,279 --> 00:12:01,460
dwarfs call home and now I tested okay I

294
00:12:01,460 --> 00:12:03,919
looked at the name on the actual adapter

295
00:12:03,919 --> 00:12:06,080
and I checked it with the name on the

296
00:12:06,080 --> 00:12:09,259
actual minion and then I change it you

297
00:12:09,259 --> 00:12:11,059
see that's the same and then I changed

298
00:12:11,059 --> 00:12:13,789
only the adapters name and check it

299
00:12:13,789 --> 00:12:15,830
again and you see that on the adapter

300
00:12:15,830 --> 00:12:18,110
but also on the minion object the names

301
00:12:18,110 --> 00:12:22,519
changed okay so this is the adapter

302
00:12:22,519 --> 00:12:25,820
pattern and our evil overlords happy

303
00:12:25,820 --> 00:12:27,649
because he only has one function to call

304
00:12:27,649 --> 00:12:30,769
but still every time when he wants to

305
00:12:30,769 --> 00:12:33,559
call all in summon all those minions he

306
00:12:33,559 --> 00:12:35,779
has to make one call for every minion he

307
00:12:35,779 --> 00:12:38,360
has so you just iterate over them and

308
00:12:38,360 --> 00:12:41,840
call so many functions he just wants one

309
00:12:41,840 --> 00:12:45,440
update rule them all just one function

310
00:12:45,440 --> 00:12:48,110
and the minions as well it sounds

311
00:12:48,110 --> 00:12:49,820
complicated but I'm pretty sure there's

312
00:12:49,820 --> 00:12:52,490
a design pattern folders and the minion

313
00:12:52,490 --> 00:12:54,350
is well educated because there's the

314
00:12:54,350 --> 00:12:56,929
facade observer pattern the facade

315
00:12:56,929 --> 00:12:58,700
observer pattern you probably all have

316
00:12:58,700 --> 00:13:01,279
used it before you also node with the

317
00:13:01,279 --> 00:13:03,860
name interface so if you may ever use an

318
00:13:03,860 --> 00:13:06,110
API that's actually interface it's a

319
00:13:06,110 --> 00:13:06,769
facade

320
00:13:06,769 --> 00:13:10,068
facade design pattern so with a facade

321
00:13:10,068 --> 00:13:11,659
design pattern we can put something in

322
00:13:11,659 --> 00:13:15,259
between that handles all all our calls

323
00:13:15,259 --> 00:13:17,058
for us so we just have to make one call

324
00:13:17,058 --> 00:13:19,339
to the facade and the facade again calls

325
00:13:19,339 --> 00:13:22,278
all the minions I'll show you again how

326
00:13:22,278 --> 00:13:25,879
that looks like and we have again our

327
00:13:25,879 --> 00:13:28,519
adapter and then I created a minion

328
00:13:28,519 --> 00:13:31,789
facade and I also created a function to

329
00:13:31,789 --> 00:13:34,039
create all the minions to take all over

330
00:13:34,039 --> 00:13:36,919
the people and that's the same that you

331
00:13:36,919 --> 00:13:38,539
know from before I just create a couple

332
00:13:38,539 --> 00:13:40,068
of adapters but then I have this one

333
00:13:40,068 --> 00:13:42,739
function to rule them all and I can

334
00:13:42,739 --> 00:13:45,019
summon all the minions and that's just

335
00:13:45,019 --> 00:13:47,419
as we have seen before a for loop of all

336
00:13:47,419 --> 00:13:49,970
the minions but I can just call one

337
00:13:49,970 --> 00:13:52,188
function that's nice and the overload on

338
00:13:52,188 --> 00:13:53,899
the other side just has to create to

339
00:13:53,899 --> 00:13:55,730
call two functions they create minion

340
00:13:55,730 --> 00:13:57,318
function and then the summoned minion

341
00:13:57,318 --> 00:13:59,509
functions so not like a for loop not a

342
00:13:59,509 --> 00:14:01,938
hundred calls going out just a single

343
00:14:01,938 --> 00:14:07,149
call to the facade all right so with the

344
00:14:07,149 --> 00:14:10,818
facade pattern in place the Overlord

345
00:14:10,818 --> 00:14:13,249
still has one last problem because the

346
00:14:13,249 --> 00:14:16,159
overlord he is a very busy person and

347
00:14:16,159 --> 00:14:18,470
very busy people have to go on vacation

348
00:14:18,470 --> 00:14:20,389
every now and then but when he's on

349
00:14:20,389 --> 00:14:21,860
vacation he doesn't want to check his

350
00:14:21,860 --> 00:14:24,078
laptop all the time to check whether all

351
00:14:24,078 --> 00:14:25,759
his minions are still in a good state

352
00:14:25,759 --> 00:14:28,669
and they're all under his control but he

353
00:14:28,669 --> 00:14:29,720
actually wants to get a notification

354
00:14:29,720 --> 00:14:32,568
whenever something changes on these

355
00:14:32,568 --> 00:14:37,159
minions and he looks up his Gang of Four

356
00:14:37,159 --> 00:14:39,078
book and he just burst through it and he

357
00:14:39,078 --> 00:14:41,509
actually finds the observer pattern so

358
00:14:41,509 --> 00:14:42,708
you might have used the observer pattern

359
00:14:42,708 --> 00:14:44,448
before especially if you if you have

360
00:14:44,448 --> 00:14:46,970
used Java because it's baked in it's a

361
00:14:46,970 --> 00:14:49,578
built-in function there and with the

362
00:14:49,578 --> 00:14:52,850
observer pattern we can just we can just

363
00:14:52,850 --> 00:14:55,428
make all these minions call back to the

364
00:14:55,428 --> 00:14:57,048
observer to our overlord

365
00:14:57,048 --> 00:14:59,389
every time when something changes so we

366
00:14:59,389 --> 00:15:01,339
don't have to actively poll and I ask

367
00:15:01,339 --> 00:15:03,918
like hey something changed no okay but

368
00:15:03,918 --> 00:15:06,948
they notify us when something changed if

369
00:15:06,948 --> 00:15:10,668
we go back to our code so this is the

370
00:15:10,668 --> 00:15:13,369
observer pattern it's two classes it's

371
00:15:13,369 --> 00:15:16,360
taken mainly from from

372
00:15:16,360 --> 00:15:20,528
but some Python you have the observer

373
00:15:20,528 --> 00:15:24,458
class that is the class of the object

374
00:15:24,458 --> 00:15:26,739
that gets notified and it has a single

375
00:15:26,739 --> 00:15:28,568
function which is an update function and

376
00:15:28,568 --> 00:15:31,298
it gets an object some arguments and

377
00:15:31,298 --> 00:15:32,708
some key value arguments so all the

378
00:15:32,708 --> 00:15:34,089
information you want to hand in there

379
00:15:34,089 --> 00:15:36,789
you can you can just change it as you

380
00:15:36,789 --> 00:15:39,428
want and then the more important part is

381
00:15:39,428 --> 00:15:42,610
the observable class which is the object

382
00:15:42,610 --> 00:15:44,739
that notifies when something changes on

383
00:15:44,739 --> 00:15:47,499
it and it just has a list of subservice

384
00:15:47,499 --> 00:15:49,629
you can add an observer you can remove

385
00:15:49,629 --> 00:15:51,730
observers and there's the most important

386
00:15:51,730 --> 00:15:53,438
part whenever something changes we

387
00:15:53,438 --> 00:15:55,869
simply call notify observers and we

388
00:15:55,869 --> 00:15:57,458
iterate through all the observers and

389
00:15:57,458 --> 00:15:59,739
simply call the update function instead

390
00:15:59,739 --> 00:16:01,298
like hey something changed here with

391
00:16:01,298 --> 00:16:03,068
this argument and this key value

392
00:16:03,068 --> 00:16:08,259
argument so when we use it in our in our

393
00:16:08,259 --> 00:16:10,869
project first of all I created an evil

394
00:16:10,869 --> 00:16:13,239
overlord class and that evil overlord

395
00:16:13,239 --> 00:16:18,759
class has an observer is inherits from

396
00:16:18,759 --> 00:16:20,589
the observer so this one will get

397
00:16:20,589 --> 00:16:22,989
notified and it will implement the

398
00:16:22,989 --> 00:16:25,089
update function so we just say we

399
00:16:25,089 --> 00:16:26,708
received the message and that's the

400
00:16:26,708 --> 00:16:30,369
information we got and then I decided on

401
00:16:30,369 --> 00:16:35,619
you making the minion adapter one and

402
00:16:35,619 --> 00:16:40,808
observable because we already wrote the

403
00:16:40,808 --> 00:16:42,489
gate attribute and set attribute

404
00:16:42,489 --> 00:16:43,928
functions here so whenever you change

405
00:16:43,928 --> 00:16:45,610
something on the actual minion object

406
00:16:45,610 --> 00:16:47,619
you will most likely go through the

407
00:16:47,619 --> 00:16:50,470
adapter and everything I have to do

408
00:16:50,470 --> 00:16:52,720
actually is make this inherit from

409
00:16:52,720 --> 00:16:56,379
observable and then say okay whenever

410
00:16:56,379 --> 00:16:57,970
something changes whenever we set an

411
00:16:57,970 --> 00:17:00,339
attribute on the object on the minion

412
00:17:00,339 --> 00:17:02,918
which is notify all the observers and we

413
00:17:02,918 --> 00:17:05,588
just send the like which attribute has

414
00:17:05,588 --> 00:17:10,599
changed to which new value yeah so when

415
00:17:10,599 --> 00:17:15,420
you run this again

416
00:17:15,420 --> 00:17:19,940
you see that first we create the minions

417
00:17:19,940 --> 00:17:23,160
we add and observer to the elves because

418
00:17:23,160 --> 00:17:27,000
I I added an function called just money

419
00:17:27,000 --> 00:17:29,819
told the elves for now and you simply

420
00:17:29,819 --> 00:17:33,059
add the overlord as an observer to the

421
00:17:33,059 --> 00:17:37,500
elf object and then yes we add the

422
00:17:37,500 --> 00:17:39,240
observer and then we just for test

423
00:17:39,240 --> 00:17:42,180
purposes change the elves name and we do

424
00:17:42,180 --> 00:17:46,769
that here here so we just say okay we

425
00:17:46,769 --> 00:17:49,710
change the name and then we changed the

426
00:17:49,710 --> 00:17:51,450
name on the adapter but as you know

427
00:17:51,450 --> 00:17:52,650
already it's actually changed on the

428
00:17:52,650 --> 00:17:55,589
minion object and then we say well the

429
00:17:55,589 --> 00:17:57,750
elves name changed and this is exactly

430
00:17:57,750 --> 00:17:59,519
what happens so we changed the elf name

431
00:17:59,519 --> 00:18:02,910
and then hey the evil overlord received

432
00:18:02,910 --> 00:18:05,069
the message something changed it's not

433
00:18:05,069 --> 00:18:07,200
good I have to look at my phone and the

434
00:18:07,200 --> 00:18:08,849
message that the message you got is from

435
00:18:08,849 --> 00:18:11,579
a minion adapter and we see that the

436
00:18:11,579 --> 00:18:13,680
attribute name was changed

437
00:18:13,680 --> 00:18:17,789
Elrond and then we say okay we

438
00:18:17,789 --> 00:18:20,609
successfully changed the elves name so

439
00:18:20,609 --> 00:18:24,539
this is this is how you see observer

440
00:18:24,539 --> 00:18:27,089
pattern you can use it it's it's a

441
00:18:27,089 --> 00:18:28,589
simple implementation that I've shown

442
00:18:28,589 --> 00:18:31,259
you here when you implement it

443
00:18:31,259 --> 00:18:32,930
especially in a more concurrent

444
00:18:32,930 --> 00:18:35,640
environment then you have to make sure

445
00:18:35,640 --> 00:18:37,650
that it's thread safe and that's a

446
00:18:37,650 --> 00:18:39,839
little more complicated but still you

447
00:18:39,839 --> 00:18:41,640
can find those observer pattern on the

448
00:18:41,640 --> 00:18:45,119
internet and just copy-paste it okay so

449
00:18:45,119 --> 00:18:47,329
with this observer pattern in place our

450
00:18:47,329 --> 00:18:49,529
evil overlord is happy and you can

451
00:18:49,529 --> 00:18:54,029
finally go on vacation about design

452
00:18:54,029 --> 00:18:55,039
patterns

453
00:18:55,039 --> 00:18:58,200
whenever you maybe maybe you have heard

454
00:18:58,200 --> 00:19:00,390
about them before and maybe you've read

455
00:19:00,390 --> 00:19:03,480
some articles and in the community there

456
00:19:03,480 --> 00:19:04,769
are a couple of things that are

457
00:19:04,769 --> 00:19:06,750
criticized on these design patterns and

458
00:19:06,750 --> 00:19:08,849
one of them being is well design

459
00:19:08,849 --> 00:19:11,160
patterns can mostly be replaced with

460
00:19:11,160 --> 00:19:16,349
built-in functionality and about this so

461
00:19:16,349 --> 00:19:17,339
we don't have to implement them

462
00:19:17,339 --> 00:19:19,259
ourselves they already kind of in our

463
00:19:19,259 --> 00:19:20,849
languages we just have to use the

464
00:19:20,849 --> 00:19:23,670
language right and about this criticism

465
00:19:23,670 --> 00:19:25,380
I have to say yes there's some truth to

466
00:19:25,380 --> 00:19:27,000
it but also know there are some things

467
00:19:27,000 --> 00:19:28,329
that don't really match

468
00:19:28,329 --> 00:19:31,359
so yes some design patterns are already

469
00:19:31,359 --> 00:19:32,799
built in

470
00:19:32,799 --> 00:19:34,960
for example the iterator pattern it's an

471
00:19:34,960 --> 00:19:36,519
actual pattern but you are if you use

472
00:19:36,519 --> 00:19:37,930
Python you're so used to it that you

473
00:19:37,930 --> 00:19:40,450
don't see it as something weird or

474
00:19:40,450 --> 00:19:43,509
something cool on you because it's just

475
00:19:43,509 --> 00:19:45,009
built in if you use a list comprehension

476
00:19:45,009 --> 00:19:47,710
anything you get irate if you heard that

477
00:19:47,710 --> 00:19:49,750
if you use something else like C++ or C

478
00:19:49,750 --> 00:19:51,990
you don't have an iterator function

479
00:19:51,990 --> 00:19:54,700
entirely sure about this but I heard

480
00:19:54,700 --> 00:19:57,220
that you have to at least when they

481
00:19:57,220 --> 00:19:58,930
wrote the book the Gang of Four then you

482
00:19:58,930 --> 00:20:00,640
had to implement the iterator thing

483
00:20:00,640 --> 00:20:02,259
yourself every time when you want to use

484
00:20:02,259 --> 00:20:05,349
it which is not really nice so this one

485
00:20:05,349 --> 00:20:06,759
is built in yes but many are actually

486
00:20:06,759 --> 00:20:08,529
not build in so as I shown already is

487
00:20:08,529 --> 00:20:10,210
the facade the interface you can't

488
00:20:10,210 --> 00:20:13,240
really have one fits all interface or

489
00:20:13,240 --> 00:20:15,789
facade you also can't have one fits all

490
00:20:15,789 --> 00:20:18,369
adapter it will always depends on the

491
00:20:18,369 --> 00:20:22,269
class you want adapt so this that's my

492
00:20:22,269 --> 00:20:24,339
opinion on this criticism and the second

493
00:20:24,339 --> 00:20:26,589
criticism you see a lot as well design

494
00:20:26,589 --> 00:20:28,269
patterns I'm really more for Java and

495
00:20:28,269 --> 00:20:30,309
c-sharp and not really that much for

496
00:20:30,309 --> 00:20:33,970
Python I must say that I disagree with

497
00:20:33,970 --> 00:20:37,599
the strong lis because yes these design

498
00:20:37,599 --> 00:20:40,390
of design patterns in general somehow

499
00:20:40,390 --> 00:20:43,119
more prevalent in these fields if you

500
00:20:43,119 --> 00:20:45,549
want to become a Java developer fresh

501
00:20:45,549 --> 00:20:47,859
from university you apply for your first

502
00:20:47,859 --> 00:20:51,130
junior developer job you must you you

503
00:20:51,130 --> 00:20:53,079
really have to know that the design

504
00:20:53,079 --> 00:20:55,089
patterns you have to know the names and

505
00:20:55,089 --> 00:20:56,559
you have to know how to implement them

506
00:20:56,559 --> 00:20:58,720
because they will most likely be part of

507
00:20:58,720 --> 00:21:01,029
your interview for your first job and

508
00:21:01,029 --> 00:21:01,839
that's in Java

509
00:21:01,839 --> 00:21:03,910
I'm not entirely sure how that some

510
00:21:03,910 --> 00:21:06,940
Python but I must say that I think they

511
00:21:06,940 --> 00:21:08,349
are also really important in Python and

512
00:21:08,349 --> 00:21:09,970
that's why I'm giving this talk because

513
00:21:09,970 --> 00:21:12,309
they not only helped you to solve

514
00:21:12,309 --> 00:21:14,410
problems but they also help you to get a

515
00:21:14,410 --> 00:21:16,180
more abstract and understanding of your

516
00:21:16,180 --> 00:21:18,069
software because when you want to use

517
00:21:18,069 --> 00:21:19,869
these design patterns what you have to

518
00:21:19,869 --> 00:21:21,339
do is you have to model your software

519
00:21:21,339 --> 00:21:23,289
mostly you have to look at how your

520
00:21:23,289 --> 00:21:25,750
components interact and when you model

521
00:21:25,750 --> 00:21:29,920
your software with UML for example then

522
00:21:29,920 --> 00:21:32,380
you really see how how your system looks

523
00:21:32,380 --> 00:21:35,380
like how it interacts and that's I think

524
00:21:35,380 --> 00:21:37,450
if you train that a lot it really it

525
00:21:37,450 --> 00:21:39,190
really gives you like it helps you

526
00:21:39,190 --> 00:21:40,339
understand yourself for better

527
00:21:40,339 --> 00:21:43,250
and you will also create a better

528
00:21:43,250 --> 00:21:45,049
structure there well structure software

529
00:21:45,049 --> 00:21:47,180
in even less time because you can just

530
00:21:47,180 --> 00:21:49,339
pick up these design patterns implement

531
00:21:49,339 --> 00:21:51,019
and implement them in your code and

532
00:21:51,019 --> 00:21:53,299
these design patterns are mostly well

533
00:21:53,299 --> 00:21:54,890
actually all of them are really well

534
00:21:54,890 --> 00:21:56,750
structured so if you implement them well

535
00:21:56,750 --> 00:21:58,730
your software immediately becomes better

536
00:21:58,730 --> 00:22:02,539
structured and one important thing about

537
00:22:02,539 --> 00:22:04,069
this whole thing is that they all

538
00:22:04,069 --> 00:22:05,900
actually offer a shared language to

539
00:22:05,900 --> 00:22:08,000
communicate so when you sit down with

540
00:22:08,000 --> 00:22:10,160
your developer colleague over lunch and

541
00:22:10,160 --> 00:22:12,289
you solve the problem with for example

542
00:22:12,289 --> 00:22:14,329
the observer pattern and yet a colleague

543
00:22:14,329 --> 00:22:17,799
tells you his problem or her problem and

544
00:22:17,799 --> 00:22:20,660
you use a thing like well you know what

545
00:22:20,660 --> 00:22:21,980
your problem is quite similar to my

546
00:22:21,980 --> 00:22:24,470
problem so if you wouldn't know the term

547
00:22:24,470 --> 00:22:26,480
observer pattern you then have to go

548
00:22:26,480 --> 00:22:28,670
into all these details of what your

549
00:22:28,670 --> 00:22:31,069
problem was and how you solved it but

550
00:22:31,069 --> 00:22:32,809
since you already know and hopefully

551
00:22:32,809 --> 00:22:34,339
your colleague also knows the term

552
00:22:34,339 --> 00:22:36,170
observer pattern you can just say well

553
00:22:36,170 --> 00:22:38,240
just use the observer pattern and let's

554
00:22:38,240 --> 00:22:40,190
say that's all you have to say so it you

555
00:22:40,190 --> 00:22:41,950
can apps you can communicate about

556
00:22:41,950 --> 00:22:45,259
problem solving on a more abstract level

557
00:22:45,259 --> 00:22:49,099
and Genma talk I would like to give you

558
00:22:49,099 --> 00:22:51,380
some takeaways one of them is please

559
00:22:51,380 --> 00:22:53,509
look at design patterns really only

560
00:22:53,509 --> 00:22:56,089
study them forget them again and then

561
00:22:56,089 --> 00:22:57,460
look them up whenever you need them

562
00:22:57,460 --> 00:23:00,230
because once you read them and I read

563
00:23:00,230 --> 00:23:02,089
the book of gang of fours myself and I

564
00:23:02,089 --> 00:23:04,009
thought like my hand that's just a

565
00:23:04,009 --> 00:23:06,349
solution I needed in my software and you

566
00:23:06,349 --> 00:23:08,630
immediately probably start using one of

567
00:23:08,630 --> 00:23:10,250
these design patterns and even later on

568
00:23:10,250 --> 00:23:12,319
when you count a different problem you

569
00:23:12,319 --> 00:23:14,089
just think back well there was something

570
00:23:14,089 --> 00:23:16,009
in the book and you just look it up and

571
00:23:16,009 --> 00:23:18,349
you have yeah like a very easy solution

572
00:23:18,349 --> 00:23:21,769
and you will write better software when

573
00:23:21,769 --> 00:23:24,890
you look at design patterns and they

574
00:23:24,890 --> 00:23:26,240
will become more and more helpful and

575
00:23:26,240 --> 00:23:28,369
even necessary the more senior you

576
00:23:28,369 --> 00:23:30,769
become so when you become when you move

577
00:23:30,769 --> 00:23:32,299
from junior developer to senior

578
00:23:32,299 --> 00:23:34,130
developer or whatever other title you

579
00:23:34,130 --> 00:23:37,759
want to use you most likely won't really

580
00:23:37,759 --> 00:23:39,710
sit in front of your computer every day

581
00:23:39,710 --> 00:23:41,480
all day long and just look at lines of

582
00:23:41,480 --> 00:23:44,660
code but you will rather start to decide

583
00:23:44,660 --> 00:23:46,579
on the overall structure of your system

584
00:23:46,579 --> 00:23:49,369
and the architecture and then when you

585
00:23:49,369 --> 00:23:51,319
know the design patterns again your job

586
00:23:51,319 --> 00:23:52,930
then becomes easier you will

587
00:23:52,930 --> 00:23:54,609
have better software you will structured

588
00:23:54,609 --> 00:23:57,190
better and with these last notes I would

589
00:23:57,190 --> 00:23:57,849
like to thank you

590
00:23:57,849 --> 00:23:58,690
[Music]

591
00:23:58,690 --> 00:24:06,480
[Applause]

592
00:24:06,480 --> 00:24:09,180
okay any questions

593
00:24:09,180 --> 00:24:11,519
[Music]

594
00:24:11,519 --> 00:24:16,119
Sariah what's that in front here yes

595
00:24:16,119 --> 00:24:17,470
absolutely

596
00:24:17,470 --> 00:24:19,269
the Gang of Four book I'm pretty sure we

597
00:24:19,269 --> 00:24:21,130
can find an online version of that one

598
00:24:21,130 --> 00:24:22,960
somewhere I bought it myself as a

599
00:24:22,960 --> 00:24:24,849
physical one because I like to just pro

600
00:24:24,849 --> 00:24:26,500
through it it takes a little bit time

601
00:24:26,500 --> 00:24:28,390
but I don't know just put it next to

602
00:24:28,390 --> 00:24:30,819
your toilet seat and every nun that lets

603
00:24:30,819 --> 00:24:47,669
go through it you and the back yeah yes

604
00:24:47,669 --> 00:24:49,839
yes yeah just look at through them

605
00:24:49,839 --> 00:24:52,269
there's one in particular that's most

606
00:24:52,269 --> 00:24:54,038
important for Python it was developed by

607
00:24:54,038 --> 00:24:55,929
a Google developer and it's called the

608
00:24:55,929 --> 00:24:58,898
bork design pattern that's for example

609
00:24:58,898 --> 00:25:00,759
is one of the new design patterns that

610
00:25:00,759 --> 00:25:02,980
are specially for Python so I would just

611
00:25:02,980 --> 00:25:04,808
say when when you go through the 23

612
00:25:04,808 --> 00:25:06,519
original ones just have a look at a

613
00:25:06,519 --> 00:25:10,058
quick look at the other 17 or 18 okay

614
00:25:10,058 --> 00:25:11,679
but next to the camera you had a

615
00:25:11,679 --> 00:25:22,390
question you can yeah and I'm sorry can

616
00:25:22,390 --> 00:25:25,319
you repeat the question so do you have

617
00:25:25,319 --> 00:25:28,929
maybe five or three top design patterns

618
00:25:28,929 --> 00:25:32,769
for Python developers no I don't have a

619
00:25:32,769 --> 00:25:35,259
list myself but the design patterns in

620
00:25:35,259 --> 00:25:36,730
the book actually structured in three

621
00:25:36,730 --> 00:25:39,609
groups which are creational behavioral

622
00:25:39,609 --> 00:25:42,609
and another group and I would say that

623
00:25:42,609 --> 00:25:45,069
it's it's most most interesting to look

624
00:25:45,069 --> 00:25:48,190
at the creational ones no sorry the

625
00:25:48,190 --> 00:25:50,589
structural structural design patterns

626
00:25:50,589 --> 00:25:53,109
that's just a list of around seven eight

627
00:25:53,109 --> 00:25:56,109
design patterns in the book if you for

628
00:25:56,109 --> 00:25:58,659
me personally they were most valuable in

629
00:25:58,659 --> 00:26:02,950
in Python development yeah I want to

630
00:26:02,950 --> 00:26:05,230
comment on the Gang of Four book yes

631
00:26:05,230 --> 00:26:07,210
it's actually not very easy to read

632
00:26:07,210 --> 00:26:09,250
especially the first time there is a

633
00:26:09,250 --> 00:26:11,980
much easier book that

634
00:26:11,980 --> 00:26:13,779
the first time you pick it up you can

635
00:26:13,779 --> 00:26:16,299
kind of think it's silly it's the head

636
00:26:16,299 --> 00:26:18,670
first serious and its head first design

637
00:26:18,670 --> 00:26:20,859
patterns yeah and there is also a very

638
00:26:20,859 --> 00:26:23,890
good web page which is called Java desh

639
00:26:23,890 --> 00:26:26,920
design - pattern yes calm and it's in

640
00:26:26,920 --> 00:26:29,319
very graphical forms they show you all

641
00:26:29,319 --> 00:26:31,119
the patterns and there are many many

642
00:26:31,119 --> 00:26:33,640
more than the both of the books list

643
00:26:33,640 --> 00:26:35,799
mm-hmm thank you very much actually that

644
00:26:35,799 --> 00:26:38,019
brings me to the very last slide is some

645
00:26:38,019 --> 00:26:40,599
references you will find this then later

646
00:26:40,599 --> 00:26:43,180
in the in the slide and what you said

647
00:26:43,180 --> 00:26:44,650
yes the Gang of Four book it's a little

648
00:26:44,650 --> 00:26:47,079
bit academic so if you want to just have

649
00:26:47,079 --> 00:26:49,059
a hands-on approach they had first book

650
00:26:49,059 --> 00:26:51,339
for design patterns is better and also

651
00:26:51,339 --> 00:26:54,009
you have some online link so the source

652
00:26:54,009 --> 00:26:56,740
making website with the design patterns

653
00:26:56,740 --> 00:26:58,569
is really well really well written they

654
00:26:58,569 --> 00:26:59,880
have really easy and understandable

655
00:26:59,880 --> 00:27:02,920
examples and they also lead lead you

656
00:27:02,920 --> 00:27:04,450
through all the design patterns and

657
00:27:04,450 --> 00:27:07,690
there are two more links that I will

658
00:27:07,690 --> 00:27:09,940
include here so on the read the ducks is

659
00:27:09,940 --> 00:27:11,369
also a good explanation there's one

660
00:27:11,369 --> 00:27:14,170
github repository that just implemented

661
00:27:14,170 --> 00:27:16,420
all of the patterns once and code so you

662
00:27:16,420 --> 00:27:24,279
can just look at it in code form no more

663
00:27:24,279 --> 00:27:26,180
questions well then thank you very much


