๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Blazor WebAssembly by Example

โœ Scribed by Toi B. Wright


Publisher
Packt Publishing Pvt. Ltd.
Year
2021
Tongue
English
Leaves
267
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Table of Contents


Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Chapter 1: Introduction to Blazor WebAssembly
Benefits of using the Blazor framework
.NET Framework
SPA framework
Razor syntax
Awesome tooling
Hosting models
Blazor Server
Blazor WebAssembly
What is WebAssembly?
WebAssembly goals
WebAssembly support
Setting up your PC
Installing Visual Studio Community Edition
Installing .NET 5.0
Installing SQL Server Express
Summary
Questions
Further reading
Chapter 2: Building Your First Blazor WebAssembly Application
Technical requirements
Razor components
Using components
Parameters
Naming components
Component life cycle
Component structure
Routing in Blazor WebAssembly
Route parameters
Catch-all route parameters
Route constraints
Razor syntax
Inline expressions
Control structures
Project overview
Creating the Demo Blazor WebAssembly project
Creating the Demo project
Running the Demo project
Examining the Demo project's structure
Examining the shared Razor components
Examining the routable Razor components
Using a component
Adding a parameter to a component
Using a parameter with an attribute
Adding a route parameter
Using partial classes to separate markup from code
Creating a custom Blazor WebAssembly project template
Creating an empty Blazor project
Creating a project template
Updating a custom project template
Using a custom project template
Summary
Questions
Further reading
Chapter 3: Building a Modal Dialog Using Templated Components
Technical requirements
RenderFragment parameters
EventCallback parameters
CSS isolation
Enabling CSS isolation
Supporting child components
Project overview
Creating the modal dialog project
Getting started with the project
Adding the Dialog component
Adding a CSS
Testing the Dialog component
Adding EventCallback parameters
Adding RenderFragment parameters
Creating a Razor class library
Testing the Razor class library
Adding a component to the Razor class library
Summary
Questions
Further reading
Chapter 4: Building a Local Storage Service Using JavaScript Interoperability (JS Interop)
Technical requirements
Why use JavaScript?
Exploring JS interop
InvokeVoidAsync
InvokeAsync
Invoking JavaScript from .NET synchronously
Invoking .NET from JavaScript
Understanding local storage
Project overview
Creating the local storage service
Creating the local storage service project
Writing JavaScript to access localStorage
Adding the ILocalStorageService interface
Creating the LocalStorageService class
Writing to localStorage
Reading from localStorage
Summary
Questions
Further reading
Chapter 5: Building a Weather App as a Progressive Web App (PWA)
Technical requirements
Understanding PWAs
HTTPS
Manifest files
Service workers
Working with manifest files
Working with service workers
Service worker life cycle
Updating a service worker
Types of service workers
Using the CacheStorage API
Using the Geolocation API
Using the OpenWeather One Call API
Project overview
Creating a PWA
Getting started with the project
Adding a JavaScript function
Using the Geolocation API
Adding a Forecast class
Adding a DailyForecast component
Using the OpenWeather One Call API
Displaying the forecast
Adding the logo
Adding a manifest file
Adding a simple service worker
Testing the service worker
Installing the PWA
Uninstalling the PWA
Summary
Questions
Further reading
Chapter 6: Building a Shopping Cart Using Application State
Technical requirements
Application state
Understanding DI
DI container
Service lifetime
Project overview
Creating the shopping cart project
Getting started with the project
Adding the Product class
Adding the Store page
Demonstrating that application state is lost
Creating the ICartService interface
Creating the CartService class
Registering CartService in the DI container
Injecting CartService
Adding the cart total to all of the pages
Using the OnChange method
Summary
Questions
Further reading
Chapter 7: Building a Kanban Board Using Events
Technical requirements
Event handling
Lambda expressions
Preventing default actions
Attribute splatting
Arbitrary parameters
Project overview
Creating the Kanban board project
Getting started with the project
Adding the classes
Creating the Dropzone component
Adding a style sheet
Creating the Kanban board
Creating the NewTask component
Using the NewTask component
Summary
Questions
Further reading
Chapter 8: Building a Task Manager Using ASP.NET Web API
Technical requirements
Understanding hosted applications
Client project
Server project
Shared project
Using the HttpClient service
Using JSON helper methods
GetFromJsonAsync
PostAsJsonAsync
PutAsJsonAsync
HttpClient.DeleteAsync
Project overview
Creating the TaskManager project
Getting started with the project
Examining the hosted Blazor WebAssembly app
Emptying the solution
Adding the TaskItem class
Adding the TaskItem API controller
Setting up SQL Server
Displaying the tasks
Completing the tasks
Deleting the tasks
Adding new tasks
Summary
Questions
Further reading
Chapter 9: Building an Expense Tracker Using the EditForm Component
Technical requirements
Overview of the EditForm component
Using the built-in input components
Using the validation components
Project overview
Creating the ExpenseTracker project
Getting started with the project
Removing the demo project
Adding the classes
Adding the API controllers
Creating the SQL Server database
Viewing the expenses
Adding the ExpenseEdit component
Adding the input components
Summary
Questions
Further reading
Why subscribe?
About Packt
Other Books You May Enjoy
Index


๐Ÿ“œ SIMILAR VOLUMES


Blazor WebAssembly by Example: A project
โœ Toi B. Wright ๐Ÿ“‚ Library ๐Ÿ“… 2021 ๐Ÿ› Packt Publishing ๐ŸŒ English

<p><b>Discover blueprints that explore various components of Blazor, C#, and .NET to help you build web apps without learning JavaScript</b></p><h4>Key Features</h4><ul><li>Explore complete, easy-to-follow web projects using Blazor</li><li>Build projects such as a weather app, expense tracker, and K

Blazor WebAssembly By Example: Use pract
โœ Toi B. Wright ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› Packt Publishing ๐ŸŒ English

<p><span>Build exciting web apps following step-by-step instructions and video examples.</span></p><p><span>Purchase of the print or Kindle book includes a free eBook in PDF format.</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore and build complete, easy-to-follow web project

Learning Blazor: Build Single-Page Apps
โœ David Pine ๐Ÿ“‚ Library ๐Ÿ› O'Reilly Media ๐ŸŒ English

<p><span>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 app

Learning Blazor: Build Single-Page Apps
โœ David Pine ๐Ÿ“‚ Library ๐Ÿ“… 2022 ๐Ÿ› O'Reilly Media ๐ŸŒ English

<p><span>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 app

Mastering Blazor WebAssembly: A step-by-
โœ Ahmad Mozaffar ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› Packt Publishing ๐ŸŒ English

<p><span>Leverage the power of WebAssembly to develop cutting-edge frontend web applications systematically with this comprehensive guide</span></p><p><span>Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore Blazor W