This is the code repository for Blazor WebAssembly By Example, Second Edition, published by Packt.
Use practical projects to start building web apps with .NET 7, Blazor WebAssembly, and C#
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.
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#.
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 Get to grips with .NET Web APIs by building a task manager app
- Introduction to Blazor WebAssembly
- Building Your First Blazor WebAssembly Application
- Debugging and Deploying a Blazor WebAssembly Application
- Building a Modal Dialog Box using templated components
- Building a Local Storage Service using JavaScript Interoperability (JS Interop)
- Building a Weather App as a Progressive Web App (PWA)
- Building a Shopping Cart using AppState
- Building a Kanban Board using Events
- Uploading and reading an Excel file
- Using Azure Active Directory to secure a Blazor WebAssembly Application
- Building a Task Manager using ASP.NET Web API
- Building an Expense Tracker using EditForm Component
If you feel this book is for you, get your copy today!
We recommend that you read the first two chapters of the book to understand how to set up your computer and how to use a Blazor WebAssembly project template. After that, you can complete the remaining chapters in any order. The projects in each chapter become more complex as you proceed through the book. The final two chapters require a SQL Server database to complete the projects. Chapter 3 and Chapter 10 require a Microsoft Azure subscription.
With the following software and hardware list you can run all code files present in the book (Chapter 1-12).
Chapter | Software required | Hardware specifications | OS required |
---|---|---|---|
1-12 | Visual Studio 2022 Community Edition, SQL Server 2022 Express Edition, Microsoft Azure | Common System | Windows, Linux or MacOS |
You can get more engaged on the discord server for more latest updates and discussions in the community at Discord
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost. Simply click on the link to claim your free PDF. Free PDF
We also provide a PDF file that has color images of the screenshots/diagrams used in this book at Graphics
Toi B. Wright has been obsessed with ASP.NET for almost 20 years. She is the founder and president of the Dallas ASP.NET User Group. She has been a Microsoft MVP in ASP. NET for 18 years and is also an ASPInsider. She is an experienced full-stack software developer, book author, courseware author, speaker, and community leader with over 25 years of experience. She has a B.S. in computer science and engineering from the Massachusetts Institute of Technology (MIT) and an MBA from Carnegie Mellon University (CMU).