MVC Overview

Get familiar with the MVC application template.

Before we can learn how to secure MVC applications, we first need to know what they are. This lesson will cover that.

Model-View-Controller (MVC) is a software architecture pattern commonly used in web development to create structured and maintainable web applications. In the context of ASP.NET Core, an MVC application is based on a project template that follows the principles of the MVC pattern.

Here's a brief overview of the components of an ASP.NET Core MVC application:

  • Model: The model represents the application's data and business logic. It defines the structure of data, how data is stored, and how it can be manipulated. In ASP.NET Core MVC, models are typically C# classes that define the data structure and may include methods to interact with the data.

  • View: The view is responsible for the presentation and user interface of the application. Views are used to render the data to the user and typically consist of HTML templates with embedded code that generates dynamic content using data from the Model.

  • Controller: The controller acts as an intermediary between the model and the view. It receives and processes user input, interacts with the model to retrieve or update data, and then selects the appropriate view to render the response. Controllers are responsible for handling requests and sending responses back to the client.

Get hands-on with 1200+ tech skills courses.