WEBVTT

1
00:00:00.940 --> 00:00:04.550
so the next one more you control
 and others this is big

2
00:00:04.560 --> 00:00:08.340
why are you just
it give you bet

3
00:00:08.750 --> 00:00:12.870
that so complicated yeah i
thought let's drive for

4
00:00:13.330 --> 00:00:16.480
really into the hot stuff right
 away so we don't have much

5
00:00:16.480 --> 00:00:20.910
time so no actually you will need
 it and you will need it for

6
00:00:21.540 --> 00:00:23.710
the problem you will
have to solve the task

7
00:00:23.940 --> 00:00:28.130
of this course you wanted to solve
 yes yes or no user interfaces

8
00:00:28.140 --> 00:00:31.970
through them and so the
problem is we need to

9
00:00:31.970 --> 00:00:36.180
separate somehow the concerns
data and logic on one hand

10
00:00:36.400 --> 00:00:39.600
use into action people click
 on buttons all the time

11
00:00:39.760 --> 00:00:45.130
like and then the
presentation in two main

12
00:00:45.130 --> 00:00:47.310
to see something yeah
there's no to react

13
00:00:47.430 --> 00:00:51.260
to and we need to separate
 all these things that

14
00:00:51.270 --> 00:00:54.900
all program keeps maintainable
and that is flexible at some

15
00:00:54.900 --> 00:00:57.840
points and also confirm rules
 so that we can kind of

16
00:00:59.230 --> 00:01:03.210
to the same things the very
 way in and change that

17
00:01:03.370 --> 00:01:07.510
yeah so it's already codes
 model you controller

18
00:01:07.520 --> 00:01:11.240
and we get three different things
 we want to decompose have

19
00:01:11.240 --> 00:01:15.310
had already than that these three
parts model of human controller

20
00:01:15.320 --> 00:01:19.980
might take certain yeah
functionality and and

21
00:01:19.990 --> 00:01:25.710
or or one of those so the the first
 stores the data and provides

22
00:01:25.710 --> 00:01:29.480
the logic also sometimes called
business logic tolls the actual

23
00:01:29.480 --> 00:01:33.460
things which are happening
 the viewers who yeah

24
00:01:33.470 --> 00:01:38.530
it's a view so it's the same your
 see if and it is therefore

25
00:01:38.540 --> 00:01:44.240
to prevent or or whatever the
yeah they they formation the

26
00:01:44.240 --> 00:01:48.270
data from the model to the user
and then there's a controller

27
00:01:48.270 --> 00:01:51.810
which handles all the interaction
 and of course of you was

28
00:01:51.810 --> 00:01:55.110
receives interactions of if you
click on a button the buttons

29
00:01:55.110 --> 00:01:59.910
part of if you of course and
we already see that in the

30
00:01:59.970 --> 00:02:06.070
other hand and the most important
 thing here is that we need

31
00:02:06.080 --> 00:02:09.730
to decouple all these things so they
 shouldn't be kind of completely

32
00:02:09.730 --> 00:02:14.220
into my one class so so
the user into x with a

33
00:02:14.220 --> 00:02:17.460
view we already said that the due
process given to the controller

34
00:02:17.710 --> 00:02:21.790
the controller updates the model
 and before all that happens

35
00:02:21.810 --> 00:02:25.990
if you which is that as an observer
 and here we got like the

36
00:02:25.990 --> 00:02:28.740
first south and then we will
 discuss in the second

37
00:02:28.840 --> 00:02:33.770
and i don't automatically
 like works right

38
00:02:34.190 --> 00:02:37.870
yeah and now we're going to
understand how the magic internally

39
00:02:37.890 --> 00:02:43.870
first so almost almost directly
because of one thing that not

40
00:02:43.870 --> 00:02:47.340
just at least want to
mention is and we see your

41
00:02:47.350 --> 00:02:50.660
it comes in like a lot of variance
 and if you start fooling

42
00:02:51.350 --> 00:02:55.240
and we see more you control if
you start fooling for diagrams

43
00:02:55.240 --> 00:02:59.920
for coal i mean it's mass
yeah you will have like

44
00:03:00.610 --> 00:03:03.560
thousand pages and two thousand
 descriptions all that

45
00:03:04.450 --> 00:03:07.940
everybody tells us like
the complete contrary

46
00:03:07.940 --> 00:03:10.760
to the to the to the wonderful
 but they all agreed

47
00:03:11.040 --> 00:03:15.350
that it's about separating the
concerns is autistic or like

48
00:03:15.350 --> 00:03:18.620
the common cold and it's not
everything is different so it's

49
00:03:18.620 --> 00:03:22.590
most likely that ninety percent
is the same and then the actual

50
00:03:22.600 --> 00:03:25.680
realisation might differ
from library to library

51
00:03:25.870 --> 00:03:28.690
because it might be used
in different contexts

52
00:03:29.640 --> 00:03:32.980
and so you basically often you
also do not implement the model

53
00:03:32.980 --> 00:03:36.930
you can call itself but you
use some sort of framework

54
00:03:37.060 --> 00:03:40.480
yeah actually does that for you
 and as it is a pattern you

55
00:03:40.480 --> 00:03:42.640
already understand than
they didn't model the

56
00:03:42.650 --> 00:03:45.020
controller and all they
 did this here and

57
00:03:45.270 --> 00:03:48.340
so if you notice the someone is
using a model you controller

58
00:03:48.340 --> 00:03:52.060
you already know that all the
data is residing and insights

59
00:03:52.060 --> 00:03:56.520
model that the view is going to
yeah going to do the presentation

60
00:03:56.520 --> 00:03:59.960
to the user and says something in
 between whatever it is called

61
00:03:59.960 --> 00:04:03.930
of might you if you have
 you want so whatever

62
00:04:04.110 --> 00:04:06.860
that method my different
 but the general idea

63
00:04:06.860 --> 00:04:11.380
is always the same soul let's
 dive into the details

64
00:04:11.530 --> 00:04:15.700
of so we have three patterns
 which all part of

65
00:04:15.710 --> 00:04:17.770
this model we can but
which model you can

66
00:04:17.900 --> 00:04:20.400
control as composed of we
have to observe a pattern

67
00:04:20.810 --> 00:04:24.620
which kind of registered to view
 as an observable for a model

68
00:04:24.740 --> 00:04:27.570
and then the model
notifies single

69
00:04:27.710 --> 00:04:31.260
service we will cover
that in the second

70
00:04:31.260 --> 00:04:34.390
we have to strategy pattern
 which can have helps us

71
00:04:34.510 --> 00:04:39.320
what the strategy for the control
 how it will solve problems

72
00:04:39.460 --> 00:04:42.510
and then when the composite
pattern which have system good

73
00:04:42.520 --> 00:04:44.750
if you from sort
of ok component

