4

The MVC Pattern Using Razor

This chapter explains the Model View Controller (MVC) and View Model design patterns and contains an overview of the ASP.NET Core MVC framework pieces in case you are not familiar with them. MVC segregates the responsibilities of rendering a user interface into three parts: the model, the view, and a controller.

The MVC pattern is probably one of the most extensively adapted architectural patterns for displaying web user interfaces. Why? Because it matches the concept behind HTTP/1 and the classic web almost to perfection. MVC might serve you well for a typical server-rendered web application using the request-response pattern. A single-page application (SPA) framework could be best for more user-intensive user ...

Get An Atypical ASP.NET Core 6 Design Patterns Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.