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