Intro To MVC
Intro To MVC
Intro To MVC
Net Mvc 5
ASP.NET MVC is based on the MVC design pattern that allows you to develop
software solutions.
ASP.NET is a free web framework for building websites and web applications
on .NET Framework using HTML, CSS, and JavaScript.
1) Tight coupling
ASP.NET Web forms are tightly coupled. Each .aspx page is dependent on it's code
behind page which makes automated testing a nightmare.
2) Loose coupling
ASP.NET MVC is loosely coupled. The logic is separated into 3 parts.
MODEL
o Models are basically classes in C#.
o Database operations such as fetch data or update data etc.
o Represents information about a domain that can be the application
data of a Web application.
VIEW
o End user gui (graphical user interface) which user can interact with
system i-e html, css, bootstrap.
o Represents the presentation logic to provide the data of the model.
CONTROLLER
o Controllers are classes in C#.
o Contain logic and provide link between model and view.
o Represents the logic responsible for coordination between the view
and model classes.
o Handles requests to the application by the user.
o Get data from database.
o Specify a view that returns a response to the client.