Skip to content

The application for the "Learning Blazor: Build Single Page Apps with WebAssembly and C#" O'Reilly Media book by David Pine.

License

Notifications You must be signed in to change notification settings

IEvangelist/learning-blazor

Repository files navigation

Learning Blazor: Build Single-Page Apps with WebAssembly and C#

Amazon Links

Media type Site
📖 Paperback (Print) Check it out on Amazon today.
💻 eBook (Kindle) Also available on Amazon Kindle devices.
Book Details
Learning Blazor: Build Single-Page Apps with WebAssembly and C# This repository is the application detailed in the "Learning Blazor: Build Single-Page Apps with WebAssembly and C#" O'Reilly Media book by David Pine. Take advantage of your C# skills to build UI components and client-side experiences with .NET. With this practical guide, you'll learn how to use Blazor WebAssembly to develop next-generation web experiences. Built on top of ASP.NET Core, Blazor represents the future of .NET single-page applications (SPA) investments.

This app is deployed to: https://webassemblyof.net

The app is a Blazor WebAssembly app, deployed to Azure as a Static Web app. It targets .NET 6, and it's packed full of C# 10 features.

Status Description
build Wether the current source code builds successfully, and all tests pass.
CodeQL The current CodeQL security / vulnerability scan result.
Azure Translation Wether the last machine-translation run was successful.
Deploy Static Web App The status of the last deployment of the Azure Static Web app.
Deploy Weather Function The status of the last deployment of the Azure Functions app.
Deploy Web API The status of the last deployment of the Azure Web API.
Deploy Pwned Web API The status of the last deployment of the Azure Pwned Web API.

Want to run this locally? See, the "Get Started" article.

Home screen (dark theme)

Learning Blazor: Home screen (dark theme)

Home screen (light theme)

Learning Blazor: Home screen (light theme)

Featuring

The app is packed with examples of how to do various things with Blazor, including but not limited to:

  • Blazor Third-Party Authentication providers:
    • Google
    • GitHub
    • "Sign up now"-based identity provider registration (with email verification).
  • Azure Functions — .NET
  • ASP.NET Core Web API
  • ASP.NET Core SignalR
  • Bulma (CSS)
  • Polly
  • Swagger / OpenAPI
  • OpenWeatherMap API
  • "Have I Been Pwned"
  • Client-Browser Native Speech Synthesis and Speech Recognition
  • Reactive Extensions (Rx.NET)
  • Azure Cosmos DB Repository-Pattern .NET SDK
  • Blazor WebAssembly Localization
  • Azure Cognitive Services Translator
  • Blazor Component Virtualization
  • Humanizer
  • Two-way JavaScript Interop (using both IJSRuntime and IJsInProcessRuntime)
    • As well as Blazorators, for source generation

NuGet Packages

I'm using several of my open-source projects within this repository.

Package Repository Purpose
IEvangelist.Azure.CosmosRepository ./azure-cosmos-dotnet-repository IRepository<TItem> via DI for light-weight access to Azure Cosmos DB.
Blazor.LocalStorage.WebAssembly ./blazorators Source-generated localStorage API implementation class library from Blazorators: C# Source Generators for Blazor.
Blazor.SpeechRecognition.WebAssembly ./blazorators Hand-written custom library that wraps browser native speechRecognition API implementation.
HaveIBeenPwned.Client ./pwned-client A .NET HTTP client for the "have i been pwned" API service from Troy Hunt.

GitHub Actions

I'm also using my Resource Translator: https://github.com/IEvangelist/resource-translator, which translates .resx resource files.

💡 Ideas for the application to include.