1

00:00:02,040  -->  00:00:09,310
So befalling the MVC architecture for our project and this is for model view controller.

2

00:00:09,690  -->  00:00:17,580
Unequals was conceived in 1970s for developing graphical user interface applications and this is extremely

3

00:00:17,580  -->  00:00:20,730
popular for developing web applications.

4

00:00:20,730  -->  00:00:26,130
So you might wonder why we are implementing this architecture which is related to web applications in

5

00:00:26,130  -->  00:00:27,890
a Java course.

6

00:00:27,900  -->  00:00:34,590
Main reason for this is typically most people once they learn Java they tend to get into application

7

00:00:34,590  -->  00:00:38,900
development very is the pattern that's most commonly used.

8

00:00:38,910  -->  00:00:44,400
So if you choose to get into web development then it would be relatively easy and a good progression

9

00:00:44,400  -->  00:00:44,990
for you.

10

00:00:45,060  -->  00:00:46,770
After doing this course.

11

00:00:46,920  -->  00:00:52,380
The reason I say it's a good progression is because in this project you will implement busy in the right

12

00:00:52,380  -->  00:00:53,510
way.

13

00:00:53,730  -->  00:00:58,950
More on my thing about MVC is it lots of different layers as we will soon see.

14

00:00:58,970  -->  00:01:03,150
And there's a nice division of responsibilities between these different layers.

15

00:01:03,210  -->  00:01:08,800
There is a layer sort of loosley couple of objects in these leaders communicate with each other.

16

00:01:09,140  -->  00:01:14,450
So it's always an object oriented language aggrievement nice to implement something where we have a

17

00:01:14,450  -->  00:01:16,190
lot of objects in mind.

18

00:01:16,560  -->  00:01:21,220
So you will see a lot of object creation and object to object communication.

19

00:01:21,240  -->  00:01:27,170
And this project Somalo to look at what the different layers in NBC are.

20

00:01:27,210  -->  00:01:28,210
There are three layers.

21

00:01:28,230  -->  00:01:35,380
The Model View and controller model holds the business logic and it usually has two suppliers.

22

00:01:35,550  -->  00:01:42,120
One is a service layer which has a real business logic while the other is the dollar which communicates

23

00:01:42,120  -->  00:01:51,390
with database and so typically in a school where is not a dollar short for data access objects in a

24

00:01:51,390  -->  00:01:58,470
Java project model would encourage polocrosse the classes and service layer are usually referred to

25

00:01:58,470  -->  00:02:05,750
as managers or alternatively or services underclasses and dourly or are usually referred to as Goffs

26

00:02:05,750  -->  00:02:06,670
.

27

00:02:06,760  -->  00:02:14,530
We use a presentation layer that is a friend and in Java world JS piece would represent the view human

28

00:02:14,540  -->  00:02:20,010
or that just be shot for Jalla so pages not coming to controller.

29

00:02:20,010  -->  00:02:26,880
It basically separates modern from the view and you will have soldiers here which are also Djala programs

30

00:02:26,880  -->  00:02:27,440
.

31

00:02:27,810  -->  00:02:32,550
So controller and motor would encourage job programs which reside in the backend.

32

00:02:32,700  -->  00:02:36,770
That is a sour note with regards to data flow.

33

00:02:36,810  -->  00:02:42,390
A user would perform some action in the browser like requesting for some data or submitting some form

34

00:02:42,390  -->  00:02:43,590
data.

35

00:02:43,860  -->  00:02:45,830
Either way action would involve some matter.

36

00:02:45,870  -->  00:02:51,750
And one of the controllers in the Bakken if action involves submitting data then the matter that the

37

00:02:51,750  -->  00:02:58,500
controller would also be bastardy dumb controller would then call the service layer which includes business

38

00:02:58,500  -->  00:02:58,820
logic.

39

00:02:58,830  -->  00:03:05,070
As mentioned earlier the business logic would involve invoking that dollar which either retrieves data

40

00:03:05,070  -->  00:03:10,950
from the database or inserts data into the database depending on the type of action performed in the

41

00:03:10,950  -->  00:03:17,280
front and if data is being retrieved from the database then it would be passed back with a view in the

42

00:03:17,280  -->  00:03:20,580
reverse order that is darf the service layer.

43

00:03:20,580  -->  00:03:25,200
So it's layer to controller and controller to the presentation layer.

44

00:03:26,280  -->  00:03:32,220
Now the advantage of NBC is that it separates business logic from the presentation layer.

45

00:03:32,220  -->  00:03:36,820
This enables business logic to be reused across different applications.

46

00:03:36,870  -->  00:03:42,570
For example you can use the same business logic for because coming from the web or mobile applications

47

00:03:42,780  -->  00:03:50,640
or even web services not coming to our project although it's not a full blown web application we would

48

00:03:50,640  -->  00:03:55,770
like to keep our implementation Oskaloosa be a real web application as possible.

49

00:03:56,540  -->  00:03:59,670
We will implement both model and controller.

50

00:03:59,670  -->  00:04:01,260
There is movement in Bremen controllers.

51

00:04:01,290  -->  00:04:08,830
Managers are not as they would be in a typical web application form you even use a Java class.

52

00:04:08,910  -->  00:04:15,970
So actions speak and in a browser are semiliterate using methods in the Java class next for database

53

00:04:16,040  -->  00:04:16,280
.

54

00:04:16,500  -->  00:04:23,040
We will again use a single Java class named datastore and one of the future versions of the project

55

00:04:23,040  -->  00:04:23,280
.

56

00:04:23,490  -->  00:04:30,150
We may use a real database like my Escorial But for now it will be a Jalla class.

57

00:04:30,150  -->  00:04:36,090
Finally if you don't implement something call entities which are nothing but classes like user bookmark

58

00:04:36,270  -->  00:04:40,660
book movie and wabbling which we are already familiar with.

59

00:04:41,100  -->  00:04:46,470
So entities are simple Djala classes undercards point to database tables.

60

00:04:46,530  -->  00:04:47,850
That is indeed obvious.

61

00:04:47,880  -->  00:04:55,380
You'd also have people like user bookmark book and so on and each instance of an entity corresponds

62

00:04:55,380  -->  00:04:57,520
to a role in a database table.

63

00:04:58,080  -->  00:05:00,370
So if we use frameworks like Hibernate.

64

00:05:00,660  -->  00:05:08,100
Entities can be directly silverbeet is that is hibernate will automatically transform an entity object

65

00:05:08,190  -->  00:05:12,980
into an obscure query visual to insert the data in the appropriate table.

66

00:05:13,580  -->  00:05:18,830
Just don't worry if you have never used a database or you have never read an obscure before.

67

00:05:18,870  -->  00:05:21,370
It's definitely not that relevant here.

68

00:05:21,970  -->  00:05:26,390
Also there are a couple of minor things I want to mention before we move on.

69

00:05:26,490  -->  00:05:32,010
Since this project is a simulation of MVC framework there are a few minor things that are implemented

70

00:05:32,250  -->  00:05:35,890
slightly differently from how we discussed earlier.

71

00:05:35,970  -->  00:05:42,480
For example some of the methods in user class like saving bookmarks would be mumbling to a manager class

72

00:05:43,030  -->  00:05:48,480
and that's purely because we are implementing the project as NBC and it makes more sense to implement

73

00:05:48,480  -->  00:05:48,850
this.

74

00:05:48,850  -->  00:05:55,080
The second thing is the code for the project will not be available for download.

75

00:05:55,500  -->  00:06:00,680
So you will have to implement everything as the project is being demonstrated.

76

00:06:00,780  -->  00:06:06,270
Finally with regards to implementation time I think the VTR time would come around two and a half hours

77

00:06:06,280  -->  00:06:06,720
.

78

00:06:07,020  -->  00:06:10,610
But I would assume it might take around 8 hours reimplemented.

79

00:06:11,100  -->  00:06:16,850
But in reality it might take a few more days to implement even this fast version.

80

00:06:16,860  -->  00:06:22,230
That's because we are not considering the time that I had to invest in designing the architecture based

81

00:06:22,230  -->  00:06:23,550
on the requirements.

82

00:06:23,940  -->  00:06:29,910
So in your professional life you will spend significant time during design office in general from my

83

00:06:29,910  -->  00:06:31,590
personal experience.

84

00:06:31,590  -->  00:06:37,940
I would recommend spending some extra time during design phase itself and get your design right.

85

00:06:38,160  -->  00:06:44,080
That way you will minimize the chances for refactoring later when you're implementing the project.

86

00:06:44,100  -->  00:06:46,290
All in all I think it's a good project.

87

00:06:46,320  -->  00:06:51,350
It's not that complex and everything will be demonstrative in a very clearly.

88

00:06:51,420  -->  00:06:54,960
All right then let's get started and make our hands dirty.
