Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Web Development with Blazor

You're reading from   Web Development with Blazor A practical guide to start building interactive UIs with C# 11 and .NET 7

Arrow left icon
Product type Paperback
Published in Mar 2023
Publisher Packt
ISBN-13 9781803241494
Length 360 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jimmy Engström Jimmy Engström
Author Profile Icon Jimmy Engström
Jimmy Engström
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Hello Blazor 2. Creating Your First Blazor App FREE CHAPTER 3. Managing State – Part 1 4. Understanding Basic Blazor Components 5. Creating Advanced Blazor Components 6. Building Forms with Validation 7. Creating an API 8. Authentication and Authorization 9. Sharing Code and Resources 10. JavaScript Interop 11. Managing State – Part 2 12. Debugging the Code 13. Testing 14. Deploy to Production 15. Moving from, or Combining, an Existing Site 16. Going Deeper into WebAssembly 17. Examining Source Generators 18. Visiting .NET MAUI 19. Where to Go from Here 20. Other Books You May Enjoy
21. Index

What this book covers

Chapter 1, Hello Blazor, will teach you the difference between Blazor server and Blazor WebAssembly. You will get an overview of how the technology works and a brief history of where Blazor comes from. Knowing the structure and differences between the hosting models is essential for understanding the technology.

Chapter 2, Creating Your First Blazor App, helps you understand how to install and set up your development environment. You will create your first Blazor app (both Blazor Server and Blazor WebAssembly) and learn about the structure of the project template.

Chapter 3, Managing State – Part 1, teaches you how to create a repository to store your data (blog posts, categories, and tags).

Chapter 4, Understanding Basic Blazor Components, digs deeper into components, life cycle events, adding parameters, and sharing parameters between components. You will also create reusable components in this chapter.

Chapter 5, Creating Advanced Blazor Components, digs even deeper into components, adding functionality such as child components, cascading parameters, and values, and covering how to use actions and callbacks.

Chapter 6, Building Forms with Validation, looks at forms, how to validate forms, and how to build your own validation mechanism. This chapter will cover the most common use cases when handling forms, such as file upload, text, numbers, and triggering code when checking a checkbox.

Chapter 7, Creating an API, looks at creating an API using Minimal API. When using Blazor WebAssembly, we need an API to get data.

Chapter 8, Authentication and Authorization, looks at adding authentication and authorization to Blazor and making sure navigation, such as redirecting to a login page, works as expected.

Chapter 9, Sharing Code and Resources, teaches you how sharing code between Blazor WebAssembly and Blazor Server projects can be shared by adding all of the things you need into a shared library. In this chapter, you will build a shared library that can be packaged as a NuGet package and shared with others.

Chapter 10, JavaScript Interop, explores how you can leverage JavaScript libraries when using Blazor and make calls from C# to JavaScript. You will also look at how JavaScript can call C# functions in our Blazor app.

Chapter 11, Managing State – Part 2, looks into the different ways of managing state (persisting data), such as using LocalStorage or just keeping data in memory using dependency injection. You will also implement real-time updates to your blog post using SignalR.

Chapter 12, Debugging the Code, teaches you how to debug your applications and add extended logging to figure out what’s wrong with your application. You will not only look at traditional debugging but also at debugging C# code directly from within the web browser.

Chapter 13, Testing, looks at automated testing so that you can make sure your components work as they should (and continue to do so). There is no built-in method to test Blazor applications, but there is an excellent community project called bUnit.

Chapter 14, Deploy to Production, will take you through the different things you need to think about when running Blazor in production.

Chapter 15, Moving from, or Combining an Existing Site, will show you how to integrate Blazor into an existing site and combine JavaScript frameworks like Angular or React with Blazor.

Chapter 16, Going Deeper into WebAssembly, covers the specific things for Blazor WebAssembly.

Chapter 17, Examining Source Generators, covers how Blazor relies heavily on source generators. In this chapter, you will learn how they work and relate to Blazor.

Chapter 18, Visiting .NET MAUI, looks at the third hosting model, Blazor Hybrid. Using .NET MAUI, you can build iOS, Android, macOS, Tizen, and Windows applications by leveraging what you have learned in this book.

Chapter 19, Where to Go from Here, is a short chapter with a call to action, some resources you can use, and a finale.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image