Dan Schnau

Will Blazor Replace MVC?

Blazor will not simply replace MVC. Blazor is a new technology with its own advantages and disadvantages, while MVC is a tried-and-true technology for building web applications with ASP.NET.

Is Blazor Better than MVC?

The short answer is no, Blazor is not Better than MVC. It's a new technology for a new type of application, and not intended to replace ASP.NET MVC. If you want to build a single-page-application or SPA like experience, and only write with .NET languages like C#, then Blazor is the technology you need. If you want to build a more classic web application experience, then ASP.NET MVC will suit your needs better.

The result of this is that if you want to build a single-page application, Blazor is likely a better choice than MVC for your needs. Blazor WebAssembly, or Blazor WASM, offers spectacular performance gains on client-side applications thanks to taking advantage of WebAssembly.

If you want to build a more classic web application experience, MVC is likely a better choice than Blazor. Blazor is a newer technology but offers potential and has been growing in popularity since 2019.

Is ASP.NET MVC still used in 2023?

It sure is! The blog you're reading this on is powered by MVC. Many enterprise applications run on MVC and they will continue to do so for the foreseeable future. MVC is a time-tested technology that has full-throated support from Microsoft.

MVC is an acronym for Model, View, Controller and it is a way of building out web applications. In short, An HTTP request comes in to the server. The request lands on a Controller, which handles the request and generates a Model. The Model is then sent to a View, which is returned by the server and rendered on the user's page. The View for this page you're reading right now is of type Blog.

MVC is a proven architecture with excellent performance and a large, healthy ecosystem of developers and software packages.

Blazor Hosting Models

Blazor is a technology built for running web applications written entirely in .NET/C#. That is. This is the key difference: in MVC, the web server is running .NET, but you're still running JavaScript in the browser for anything done client-side. With Blazor, everything is run in .NET, both server and client code. Blazor runs .NET code on the browser thanks to WebAssembly, or WASM. Essentially, a tiny version of the .NET framework is sent to the browser, then compiled C# code is sent along with it. This Blazor model is called Blazor WASM.

Blazor can also run entirely server side, with page updates sent to the browser via a SignalR pipeline. This model is called Blazor Server.

In combination with Blazor WASM, and Blazor Server, some code can run on the server, and other code can run on the browser in a hosting model called Blazor Hybrid.