Blazor WebAssembly By Example : Use practical projects to start building web apps with .NET 7, Blazor WebAssembly, and C#, 2/e (Paperback)

Wright, Toi B.

  • 出版商: Packt Publishing
  • 出版日期: 2023-02-28
  • 售價: $1,460
  • 貴賓價: 9.5$1,387
  • 語言: 英文
  • 頁數: 438
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1803241853
  • ISBN-13: 9781803241852
  • 相關分類: .NETC#WebAssembly
  • 海外代購書籍(需單獨結帳)
    無現貨庫存(No stock available)



Build exciting web apps following step-by-step instructions and video examples.

Key Features

• Explore and build complete, easy-to-follow web projects using Blazor. Each project includes a video example too.
• Test your skills in building a weather app, an expense tracker, and a Kanban board with real-world applications.
• Develop a deeper understanding on how to work with Blazor WebAssembly without spending too much time focusing on the theory.

Book Description

Blazor WebAssembly helps developers build web applications without the need for JavaScript, plugins, or add-ons. With its continued growth in popularity, getting started with Blazor now can open doors to new career paths and exciting projects – and Blazor WebAssembly by Example will make your first steps easier. This is a project-based guide that will teach you how to build single-page web applications with Blazor, focusing heavily on the practical over the theoretical by providing detailed step-by-step instructions for each project. The author also includes a video for each project showing her following the step-by-step instructions, so readers can use them if they're unsure about any particular step.

In this updated edition, you'll start by building simple standalone web applications and gradually progress to developing more advanced hosted web applications with SQL Server backends. Each project will cover a different aspect of the Blazor WebAssembly ecosystem, such as Razor components, JavaScript interop, security, event handling, debugging on the client, application state, and dependency injection. The book's projects get more challenging as you progress, but you don't have to complete them in order, which makes this book a valuable resource for beginners as well as those who just want to dip into specific topics.

By the end of this book, you will have experience and lots of know-how on how to build a wide variety of single-page web applications with .NET, Blazor WebAssembly, and C#.

What you will learn

• Discover the power of the C# language for both server-side and client-side web development
• Build your first Blazor WebAssembly application with the Blazor WebAssembly App project template
• Learn how to debug a Blazor WebAssembly app, and use ahead-of-time compilation before deploying it on Microsoft's cloud platform
• Use templated components and the Razor class library to build and share a modal dialog box
• Learn how to use JavaScript with Blazor WebAssembly
• Build a progressive web app (PWA) to enable native app-like performance and speed
• Secure a Blazor WebAssembly app using Azure Active Directory
• Gain experience with ASP.NET Web APIs by building a task manager app

Who this book is for

This book is for .NET web developers who want to leverage the power of .NET and C# to write single-page web applications using Blazor WebAssembly without using JavaScript frameworks. To get started with this book, you'll need at least beginner-level knowledge of the C# language, .NET framework, Microsoft Visual Studio, and web development concepts.




- 使用 Blazor 探索並建立完整易於遵循的網頁專案。每個專案都包含視頻範例。
- 通過實際應用程式,測試您在建立天氣應用程式、費用追蹤器和看板應用程式方面的技能。
- 在不過多關注理論的情況下,深入了解如何使用 Blazor WebAssembly 進行開發。


Blazor WebAssembly 幫助開發人員構建網頁應用程式,無需使用 JavaScript、插件或附加組件。隨著其不斷增長的流行度,現在開始使用 Blazor 可以為您打開新的職業道路和令人興奮的專案,而《Blazor WebAssembly by Example》將使您的第一步更輕鬆。這是一本以專案為基礎的指南,將教您如何使用 Blazor 構建單頁網頁應用程式,重點是實踐而非理論,為每個專案提供詳細的逐步指示。作者還為每個專案提供了一個視頻,展示她如何按照逐步指示進行操作,因此讀者可以在不確定任何特定步驟時使用這些視頻。

在這個更新的版本中,您將從構建簡單的獨立網頁應用程式開始,逐漸發展到開發具有 SQL Server 後端的更高級的托管網頁應用程式。每個專案都涵蓋 Blazor WebAssembly 生態系統的不同方面,例如 Razor 元件、JavaScript 互操作性、安全性、事件處理、客戶端調試、應用程式狀態和依賴注入。隨著您的進展,書中的專案會變得更具挑戰性,但您不必按順序完成它們,這使得這本書對於初學者以及只想深入研究特定主題的人來說都是一個寶貴的資源。

通過閱讀本書,您將獲得使用 .NET、Blazor WebAssembly 和 C# 構建各種單頁網頁應用程式的經驗和豐富知識。


- 發現 C# 語言在伺服器端和客戶端網頁開發中的威力。
- 使用 Blazor WebAssembly App 專案範本建立您的第一個 Blazor WebAssembly 應用程式。
- 學習如何在部署到 Microsoft 的雲平台之前,對 Blazor WebAssembly 應用程式進行調試和預先編譯。
- 使用模板化元件和 Razor 類庫構建並共享模態對話框。
- 學習如何在 Blazor WebAssembly 中使用 JavaScript。
- 構建一個漸進式網頁應用程式(PWA),以實現原生應用程式般的性能和速度。
- 使用 Azure Active Directory 保護 Blazor WebAssembly 應用程式。
- 通過構建任務管理器應用程式,獲得使用 ASP.NET Web API 的經驗。

本書適合對於使用 Blazor WebAssembly 構建單頁網頁應用程式,並且不使用 JavaScript 框架的 .NET 網頁開發人員。要開始閱讀本書,您至少需要具備初級水平的 C# 語言、.NET 框架、Microsoft Visual Studio 和網頁開發概念的知識。


1. Introduction to Blazor WebAssembly
2. Building Your First Blazor WebAssembly Application
3. Debugging and Deploying a Blazor WebAssembly App
4. Building a Modal Dialog Using Templated Components
5. Building a Local Storage Service Using JavaScript Interoperability (JS Interop)
6. Building a Weather App as a Progressive Web App (PWA)
7. Building a Shopping Cart Using Application State
8. Building a Kanban Board Using Events
(N.B. Please use the Look Inside option to see further chapters)


1. Blazor WebAssembly 簡介
2. 建立你的第一個 Blazor WebAssembly 應用程式
3. 調試和部署 Blazor WebAssembly 應用程式
4. 使用範本組件建立模態對話框
5. 使用 JavaScript 互操作性(JS Interop)建立本地儲存服務
6. 將天氣應用程式建立為漸進式網路應用程式(PWA)
7. 使用應用程式狀態建立購物車
8. 使用事件建立看板應用程式