What exactly saying about MVC is an architecture or framework or design pattern?
Hi,I want to know what is exact definition of asp.net MVC.
MVC: MOdel View Controller
MVC it is a frame work.
One of the design pattern which is similar to 3-tier Architecture which is used to work with web applications
Model:
Model represents entity. Business Entity framework..
Converting Database into a class, with attributes of table columns and their datatypes like int etc.
columns with data type in class, So in future changing of database from Sql 2 Oracle,so no need to change the core part.
Finally it takes care of DAL Data Access and Validation Rules etc.
View:
It is the .aspx file
It takes care of UI (Presentation)
Controller:
contains the control flow logic..
It is the .cs file, takes care of communication b/w Model and View, to control the flow of information and execution of the application.
An MVC Application is designed and implemented using the following three attributes
Model, View , Controller.Where these 3 are not dependent on each other.
Here single controller can fulfill requirements of all the Views.
One advantage is Routing, where no need to see filename.aspx in URL, with Routing concept we can see our desired name instead of filename.aspx
Why to use MVC?
If we go with 3 tier, control flow will go from UI to Business layer and then DAL.and Vice versa for the response also.
And when we want to change any in any layer need to change in other layers too.