Blazor:
- UI web framework based on .NET
- .NET based web framework for building UI components(Razor components)
- compiles to Web-Assembly (wasm)
- can run on the client via web assembly
- can run on the server
Razor: markup syntax for .NET
Razor component:
- .cshtml extension
- markup(HTML) + logic(C#)
.NET MAUI vs .NET MAUI Blazor?
- XML with MAUI
- you can use HTML with the Blazor version
- uses SignalR connection
- SignalR
- ASP.NET library
- allows server to send async notifications to client
- basically allows easy real-time web functionality
- pros
- smaller download sizes for the user, saves bandwidth
- cons
- There's no offline support. If the client connection fails, the app stops working.
commands:
dotnet new blazorserver
- runs on web assembly based browser runtime
- Blazor app + .NET runtime + dependencies
- no backend ASP.NET Core app = standalone
- backend = hosted
- can be built as PWA(Progressive Web App)
- PWA
- uses modern browser APIs
pro:
- enables native client app capabilities
- works offline, run in own app window
cons:
- bigger download sizes for clients
commands:
dotnet new blazorwasm
- app runs in embedded Web View
- hybrid app = native app + web technology
- no WebAssembly
- Razor component + .NET code + HTML/CSS
- can be built on different .NET native app frameworks
- .NET MAUI
- WPF (Windows Presentation Foundation)
- Windows Form
pros:
- good for native platforms
cons:
- have to manage multiple platform-specific app versions
- no official support
Commands:
dotnet workload install mauidotnet new maui-blazor
.NET MAUI (.NET Multi-platform App UI)
- cross-platform framework for making native mobile and desktop apps with C# and XAML
tags: web, framework, native, mobile, desktop, ASP.NET, .NET, Blazor, Razor, MAUI, WPF, windows forms, WASM, WebAssembly, SignalR
Gist of this: