This document provides an overview of ASP.NET Core and Blazor frameworks. It discusses the differences between ASP.NET and ASP.NET Core, benefits of ASP.NET Core like cross-platform support and modern frontend frameworks. It also summarizes Razor Pages, MVC, and Blazor - the different UI frameworks in ASP.NET Core. Blazor allows building client-side web apps using C# and runs using WebAssembly or as server-rendered apps. The document demonstrates how Blazor works and compares client-side versus server-side Blazor. It also includes a demo of building hybrid mobile/desktop apps with Blazor and .NET Multi-platform App UI.
This delineation of responsibilities helps you scale the application in terms of complexity because it's easier to code, debug, and test something (model, view, or controller) that has a single job.
Blazor is a fully featured single page application framework by Microsoft
It has a huge ecosystem of .NET packages on NuGet because it’s compatible with .NET standard
Blazor is independent of it’s hosting model
This means we have options when hosting host Blazor applications.
The most common options are Client-Side, and Server-Side hosting.
Let’s discuss the two options starting with Client-Side Blazor.
In a typical application JavaScript is downloaded by the browser
It is then parsed, compiled, and turned into byte code before it can execute.
A more modern approach is to use WebAssembly, which is a standard byte code browsers can execute.
What makes WebAssembly different, is that it is parsed and compiled before it is delivered to the browser.
Languages other than JavaScript, such as C++ can compile directly to WebAssembly byte code.
Microsoft has taken the .NET runtime and compiled as web assembly.
This makes it possible to run .NET code directly in the browser.
This is how Blazor enables developers to write .NET code in a client-side web application.
Because the .NET runtime is available on the client, we can utilize virtually any .NET Standard assembly.