MVC Architecture | Code By Topic

MVC Architecture

Mvc Architecture
In this topic , you will get an basic concept  of MVC architecture or MVC design pattern. Here we discuss ASP . net MVC pattern.  MVC architecture has existed in technology very  long time approx more than 10 year. MVC is not related with only ASP.NET it's also vastly used in other programming language like MVC in java , PHP MVC , angular JS etc . Angualr Js is scripting language and its also follow the MVC design pattern. Technically implementation of MVC in all languages is slightly different , but conceptually it remains the same.
Let's understand the MVC architecture in ASP.NET.
MVC stands for Model, View and Controller and it basically used for developed the web based application.I am talking here web based application then the question arises is MVC architecture is not good for Windows form ? Answer is no if you are working with window programming then MVP pattern is good and if you are working with WPF then MVVM pattern is good. MVC is one of the main framework to create a extensible web based project.

Mvc Architecture in ASP .Net [MVC Components]

MVC Architecture  Design pattern

Model : Model is used for managing the data.Model is used for set the property & also business logic As from the above picture we can see that it also interact with database . MVC not given any  data access layer but in this design pattern we are able to implement these access layer and implement the business login in Model class. For example Student is Model class & this object will fetch the student information from the database (any database like oracle,sql server, mysql) and manipulate it here .It also get back data to database.

View  : View component is a presentation of data in particular format. It also known as presentation layer. View is used for all the UI (user interface) logic. For example in VIEW include all the html like form input type etc & also used for display the data from database which is manipulated from model.

Controller : Controller is very important component in MVC arcticture. MVC Controller act as interface between model & view. Its handle the user request & send it back to user. For example, the Student controller would handle all the interactions and inputs from the Student View and manipulate the database using the Student Model.

1 comment: