DEV Community

Nguyễn Tiến Dũng
Nguyễn Tiến Dũng

Posted on

MVC Architecture in .NET App

Hey Hello, In this article series I’m going to cover the following areas in the Web development with C#, ASP .NET Core MVC, MVVM Tech Stack.

  1. ASP .NET Core
  2. Razor Pages and Blazor
  3. MVC Architecture
  4. MVVM Architecture
  5. Models, ViewModels, Views, Partial views, Controllers, ViewComponents
  6. Dependency injection, Major dependency injection lifetimes, Services
  7. SQL Server configuration, EFCore migrations, Relationship types
  8. Authentication, Authorization, Cookie-based Authentication
  9. Azure Deployment

So, In this section, we will talk about MVC architecture at a high level.

What is MVC mean?
The Model-View-Controller (MVC) is an architectural design pattern that divides a software application/system into three main logical components,

The model
The view
The controller
Each of these components is made to control and manage specific development domains in an application.

MVC is one of the most frequently used industry-standard web development frameworks to create scalable and extensible projects.

Image description
In basic C# ASP .NET Core Web applications, it acts as a C# class which holds application data as a Data Blueprint. It also manages the Database operations and relations.

Ex: Buyer, Seller, Admin User, Categories Classes in e-commerce Applications

So Basically, The Model component corresponds to all the data-related logic that the user works with.

The view is a component that displays the user interface. In C#, It’s the CSHTML file (Razor Views). This handles the app's data presentation and user interaction

In view, you can trigger/notify the events that get handled by the controllers.

A controller controls the workflow that a user interacts with MVC application*.* A controller contains the flow control logic for an ASP.NET MVC application. A controller determines what response to send back to a user when a user makes a browser request.

Top comments (0)