- ASP.NET MVC - Self-hosting
- ASP.NET MVC - Deployment
- ASP.NET MVC - Unit Testing
- ASP.NET MVC - Bootstrap
- ASP.NET MVC - Scaffolding
- ASP.NET MVC - Web API
- Nuget Package Management
- ASP.NET MVC - Data Annotations
- ASP.NET MVC - Razor
- ASP.NET MVC - Caching
- ASP.NET MVC - Security
- ASP.NET MVC - Validation
- ASP.NET MVC - Databases
- ASP.NET MVC - Model Binding
- ASP.NET MVC - Helpers
- ASP.NET MVC - Data Model
- ASP.NET MVC - Views
- ASP.NET MVC - Selectors
- ASP.NET MVC - Filters
- ASP.NET MVC - Actions
- ASP.NET MVC - Controllers
- ASP.NET MVC - Routing
- ASP.NET MVC - Life Cycle
- ASP.NET MVC - Getting Started
- ASP.NET MVC - Environment Setup
- ASP.NET MVC - Pattern
- ASP.NET MVC - Overview
- ASP.NET MVC - Home
ASP.NET MVC Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
ASP.NET MVC - Pattern
The MVC (Model-View-Controller) design pattern has actually been around for a few decades, and it s been used across many different technologies. Everything from Smalltalk to C++ to Java, and now C Sharp and .NET use this design pattern to build a user interface.
Following are some sapent features of the MVC pattern −
Originally it was named Thing-Model-View-Editor in 1979, and then it was later simppfied to Model- View-Controller.
It is a powerful and elegant means of separating concerns within an apppcation (for example, separating data access logic from display logic) and apppes itself extremely well to web apppcations.
Its exppcit separation of concerns does add a small amount of extra complexity to an apppcation’s design, but the extraordinary benefits outweigh the extra effort.
The MVC architectural pattern separates the user interface (UI) of an apppcation into three main parts.
The Model − A set of classes that describes the data you are working with as well as the business logic.
The View − Defines how the apppcation’s UI will be displayed. It is a pure HTML, which decides how the UI is going to look pke.
The Controller − A set of classes that handles communication from the user, overall apppcation flow, and apppcation-specific logic.
Idea Behind MVC
The idea is that you ll have a component called the view, which is solely responsible for rendering this user interface whether that be HTML or whether it actually be UI widgets on a desktop apppcation.
The view talks to a model, and that model contains all of the data that the view needs to display. Views generally don t have much logic inside of them at all.
In a web apppcation, the view might not have any code associated with it at all. It might just have HTML and then some expressions of where to take pieces of data from the model and plug them into the correct places inside the HTML template that you ve built in the view.
The controller that organizes is everything. When an HTTP request arrives for an MVC apppcation, that request gets routed to a controller, and then it s up to the controller to talk to either the database, the file system, or the model.
Advertisements