Book Image

Mastering Blazor WebAssembly

By : Ahmad Mozaffar
3.5 (2)
Book Image

Mastering Blazor WebAssembly

3.5 (2)
By: Ahmad Mozaffar

Overview of this book

Blazor WebAssembly is a revolutionary technology in software development that enables you to develop web applications with a rich user interface using C# without JavaScript. It can be run natively in the browser and soon on mobile apps with .NET MAUI, making it a superweapon in the .NET developer’s toolbox. This capability has opened the doors for the JavaScript community to have a stable framework to build single page applications (SPAs) maintained by Microsoft and driven by the community. Mastering Blazor WebAssembly is a complete resource that teaches you everything you need to build client-side web applications using C# & .NET 7.0. Throughout this book, you’ll discover the anatomy of a Blazor WebAssembly project, along with the build, style, and structure of the components. You’ll implement forms to catch user input and collect data, as well as explore the topics of navigating between the pages in depth. The chapters will guide you through handling complex scenarios like RenderTrees, writing efficient unit tests, using variant security methods, and publishing the app to different providers, all in a practical manner. By the end of this book, you’ll have the skills necessary to build web apps with Blazor WebAssembly, along with the basics for a future in mobile development with .NET MAUI and Blazor.
Table of Contents (21 chapters)
1
Part 1: Blazor WebAssembly Essentials
5
Part 2: App Parts and Features
13
Part 3: Optimization and Deployment

Preface

Single-page applications (SPAs) have become an essential part of modern technology. We have become more dependent on browsers than ever before. With the release of Angular, ReactJS, and other JavaScript frameworks for developing modern web apps, a big revolution occurred. JavaScript was dominant in the field for many years as the only language to be understood and run in browsers. In 2015, WebAssembly arrived as a technology experiment that allowed browsers to run programming languages other than JavaScript, such as C# and C.

With WebAssembly, the doors have opened for more powerful web apps and new frameworks to be used to build things in browsers. Microsoft was the first adopter of WebAssembly by announcing Blazor, a framework that allows .NET developers to build modern and advanced web applications using C# that can run natively in a browser.

In 2018, when Blazor was still an experimental project of Microsoft's, I started to use it, and I was amazed at how powerful it was and the huge potential it had in the world of web and software development in general, outside the boundaries of the browser. From that day onward, I started to create packages and build demos and production-ready apps with it, until it became the main technology I used for my full-time work.

Mastering Blazor WebAssembly utilizes all my experience in Blazor and .NET to show you, in depth, how Blazor WebAssembly works and how you can leverage it, step by step, to build fascinating modern web apps that run natively with C# inside the browser. It will show you how to build the foundations you need to use Blazor WebAssembly to build cross-platform mobile and desktop apps by utilizing .NET MAUI and Blazor WebAssembly.

The book begins by introducing Blazor WebAssembly and how to set up a new project. Then, it covers all the features and concepts of Blazor WebAssembly with practical examples and theoretical explanations. You will learn how Blazor WebAssembly works internally and how to use it effectively. By the end of this book, you will have developed a complete, workable, and efficient test application that you can publish to the cloud.