-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathMVC design pattern or architecture
32 lines (25 loc) · 1.77 KB
/
MVC design pattern or architecture
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
The MVC architecture or Design Patter is also called as "SEPARATION OF CONCERNS"
Watch the following videos for understanding MVC. Please watch all the videos:
4 minute video: https://www.youtube.com/watch?v=qXRcVhWxuaU
4 minute video: https://www.youtube.com/watch?v=YuqJcy6zCMU
4 minute video: https://www.youtube.com/watch?v=eTdVkgF_Slo
4 minute vidoe: https://www.youtube.com/watch?v=vJwE5eNiAfk
Model -> This layer handles the DATA.
Also called as "the brain". This contains the bussiness logic. This layer also interacts with the
Data-Access layer (also called as database) for retrieving User Query results(the different user queries are
provided by the Controller which interacts with User Input)
View -> This layer handles the DECISIONS.
This is the front end(User Interface) or the part of the application visible to the user. Many views can be created
for different users according to their priority and access levels
Controller -> This layer handles the PRESENTATION.
The Controller is responsible for handling user inputs. This is the part which takes input from
the user and provides to the Model which gives query results to View so that the query results are visible
to the user.
PLEASE NOTE:
1) Controller is the middle layer between Model and View.
2) Model and View donot talk to each other directly. They talk through the controller.
3) Model can talk to Controller. View can talk to Controller. Controller can talk to both Model and View.
4) To understand the above three lines, please watch the fourth video link mentioned above
We can say that one of the COMMON flow in MVC architecture or design patttern is:
Controller(take inputs from user) -> Model (communicate with database or data-access layer to provide query
result) -> View (show the proper query results to the user)