Tuesday, 4 August 2015

What is ASP .NET MVC ?

ASP.NET MVC stands for ASP.NET Model View Controller design pattern. MVC was first invented by Trygve Reenskaug and was named as “Thing Model View Editor” pattern originally. Slowly it became popular and renamed as “Model View Controller”.

ASP.NET MVC was created by Scott Guthrie of Microsoft in 2007 based on the MVC framework implemented in different framework like Ruby on Rails, Spring etc. ASP.NET MVC (Model View Controller) is an architectural design pattern that separates an application into three main components
  1. Model
  2. View and
  3. Controller

ASP.NET MVC is not the replacement of traditional ASP.NET Web form but it’s an alternative. The ASP.NET MVC App is highly testable application than traditional ASP.NET Web form applications.

It divides an application into 3 component role which is  based on a framework methodology.
These component roles are as follows:
Model: These component role are to maintain the state which is persisted inside the DataBase.
ex:  We might have a Employee class that is used to represent the details of Employee from the Emp table inside the SQL.
View: These component role are used to display user interface of an application.
ex: We might to create an Employee details "Edit" view that surface TextBox,DropDown,CheckBox etc.. based on current state of an Employee.
Controller: These component role are various purposes like handling end  user interaction,manipulating the Model,and ultimately choosing a view to render to display UI.or The class that manage the relationship between View and Model.
Note:  In MVC application,the view are used only for displaying the information whereas controller are used  to hanlding and responding to user input and interaction. 

No comments:

Post a Comment