My Account Log in

1 option

Web Development with Blazor : A practical guide to building interactive UIs with C# 14 and .NET 10 / Jimmy Engström, Daniel Roth.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Engström, Jimmy.
Language:
English
Subjects (All):
Microsoft .NET Framework.
C# (Computer program language).
Web site development.
Web-based user interfaces.
Physical Description:
1 online resource (458 pages)
Edition:
1st ed.
Place of Publication:
Birmingham : Packt Publishing, Limited, 2026.
Summary:
Master Blazor's evolving render modes, hosting models, and observability features with practical projects and real-world architecture.Build confidently for production with.NET 10 and C# 14 Key Features Dedicated, side-by-side coverage of Blazor render modes without forcing them into a single project Updated for.NET 10 LTS with first-class.
Contents:
Intro
Web Development with Blazor
Fourth Edition
A practical guide to building interactive UIs with C# 14 and .NET 10
Foreword
Contributors
About the author
About the reviewers
Table of Contents
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Share your thoughts
Free benefits with your book
How to Unlock
Part 1
Getting Started with Blazor
1
Hello Blazor
Technical requirements
How Blazor was created
Why Blazor?
Preceding Blazor
Introducing WebAssembly
Introducing .NET
Summary
Further reading
Learn more on Discord
2
Creating Your First Blazor App
Setting up your development environment
Windows
macOS and Linux (or Windows)
Installing Docker
Creating our first Blazor application
Exploring the templates
Blazor Web App template
Blazor WebAssembly Standalone App template
Creating a Blazor web application
Introducing the .NET CLI
Figuring out the project structure
Program.cs (BlazorWebApp project)
Program.cs (BlazorWebApp.Client)
App (BlazorWebApp)
Routes
Main layout
NavMenu
CSS
Get this book's PDF version and more
3
Exploring Render Modes
Running the WebAppTest project
Understanding Server-Side Rendering (SSR)
Static SSR
Testing static SSR
Streaming SSR
Testing streaming SSR
Enhanced navigation
Delving into the Blazor Server / Interactive Server
Benefits of Blazor Server
Downsides of Blazor Server
Testing the render mode
Real-world usage
Exploring Blazor WebAssembly / Interactive WebAssembly
Benefits of Blazor WebAssembly.
Downsides of Blazor WebAssembly
Real-world notes
Understanding Auto / Interactive Auto
Understanding where to put interactivity
Global
Per component (or page)
What should you choose?
4
Uncovering Aspire
What is Aspire?
Why use Aspire?
Project structure
AppHost project
ServiceDefaults project
BlazorWebApp and BlazorWebApp.Client
References and wiring
The big picture
Unraveling the Aspire Community Toolkit
What is it?
Examples of community resources
Exploring the Aspire dashboard
Exploring logs, traces, and metrics
Structured logs
Traces
Metrics
Correlated logs
Part 2
Building a Blazor Application
5
Managing State - Part 1
Creating data classes
Creating an interface and models
Creating the repository
Adding the repository and database
Adding PostgreSQL
Configuring the database and repository
Exploring pgAdmin
6
Understanding Basic Blazor Components
Exploring components
Counter
Weather
Learning Razor syntax
Razor code blocks
Implicit Razor expressions
Explicit Razor expressions
Expression encoding
Directives
Adding an attribute
Adding an interface
Inheriting
Generics
Changing the layout
Setting a namespace
Setting a route
Adding a using statement
Understanding dependency injection
Singleton
Scoped
Transient
Injecting the service
Changing the render mode
Coming from an old template
Figuring out where to put the code
In the Razor file
In a partial class
Inheriting a class
Only code
Exploring lifecycle events.
OnInitialized and OnInitializedAsync
OnParametersSet and OnParametersSetAsync
OnAfterRender and OnAfterRenderAsync
ShouldRender
Understanding parameters
Cascading parameters
Writing our first component
7
Creating Advanced Blazor Components
Exploring binding
One-way binding
Two-way binding
Diving into Actions and EventCallback
Using RenderFragment
ChildContent
Building an alert component
Designing components for real-world use
Exploring the new built-in components
Setting the focus of the UI
Influencing the HTML head
Component virtualization
Error boundaries
Sections
8
Building Forms with Validation
Exploring form elements
EditForm
InputBase&lt
&gt
InputCheckbox
InputDate&lt
TValue&gt
InputNumber&lt
InputSelect&lt
InputText
InputTextArea
InputRadio
InputRadioGroup
InputFile
Adding validation
ValidationMessage
ValidationSummary
Custom validation class attributes
Looking at bindings
Binding to HTML elements
Binding to components
Building an admin interface
Listing and editing categories
Listing and editing tags
Listing and editing blog posts
Why use an abstraction layer for your components
Adding shared components
Creating a button component
Locking the navigation
9
Creating an API
Creating the service
Learning about Minimal APIs
Adding the API controllers
Adding APIs for handling blog posts
Adding APIs for handling categories
Adding APIs for handling tags
Adding APIs for handling comments
Creating the client.
Summary
10
Adding Authentication and Authorization
Setting up authentication
Setting up Auth0
Configuring our Blazor app
Securing our Blazor app
Securing Blazor WebAssembly
Configuring the client application
Running the application
Adding roles
Configuring Auth0 by adding roles
Adding roles to Blazor
11
Sharing Code and Resources
Adding static files
Choosing between frameworks
Adding a new style
Adding CSS
Making the admin interface more usable
Making the menu more useful
Making the blog look like a blog
CSS isolation
Fixing the background
12
JavaScript Interop
Why do we need JavaScript?
.NET to JavaScript
Global JavaScript (the old way)
Collocated JavaScript
JavaScript to .NET
Static .NET method call
Instance method call
Implementing an existing JavaScript library
JavaScript interop in WebAssembly
13
Managing State - Part 2
Persistent component state
Storing data on the server side
Storing data in the URL
Route constraints
Using a query string
Implementing browser storage
Implementing session storage
Implementing the shared code
Using an in-memory state container service
Implementing real-time updates on InteractiveServer
Implementing real-time updates on Blazor WebAssembly
State management frameworks
Root-level cascading values
Part 3
Running Blazor with Confidence
14
Debugging the Code
Technical requirements.
Making things break
Debugging Blazor Server
Debugging Blazor WebAssembly
Debugging Blazor WebAssembly in the web browser
Hot Reload
15
Exploring Tracing and Metrics
Blazor Server metrics and tracing
Enabling metrics and tracing
What the metrics tell us
Tracing in Blazor
Blazor WebAssembly diagnostics
Browser developer tools diagnostics
WebAssembly Event Pipe diagnostics
Collecting CPU samples
Collecting runtime metrics
Collecting a GC dump
16
Testing
What is bUnit?
Setting up a test project
Mocking the API
Writing tests
Authentication
Testing JavaScript
Blazm extension
17
Deploy to Production
Continuous delivery options
Additional deployment resources
Hosting options
Hosting Blazor Server/InteractiveServer
Hosting InteractiveWebAssembly
Hosting Blazor WebAssembly Standalone
Hosting on IIS
Part 4
Going Beyond the Main Application
18
Moving From, or Combining, an Existing Site
Introducing web components
Exploring custom elements
Exploring the Blazor component
Adding Blazor to an Angular site
Adding Blazor to a React site
Adding Blazor to MVC/Razor Pages
Adding web components to a Blazor site
Migrating from Web Forms
19
Going Deeper into WebAssembly
Exploring the WebAssembly template
.NET WebAssembly build tools
AOT compilation
WebAssembly Single Instruction, Multiple Data (SIMD)
Trimming
Lazy loading
Progressive web apps.
Native dependencies.
Notes:
Description based on publisher supplied metadata and other sources.
ISBN:
9781806112883
OCLC:
1595743435
Publisher Number:
CIPO000367341

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account