Blazor Fundamentals
Published by O'Reilly Media, Inc.
A fast-paced workshop for building interactive web apps in C#
Are you a C# developer looking to ramp on full-stack web development? Blazor is the exciting future web apps in C# and .NET. With Blazor, you can leverage your existing C# knowledge to create rich interactive web applications that use C# code for both the web frontend and the server. Even better, Blazor is built on ASP.NET Core—so if you're an ASP.NET web developer, this course will build on your existing skills to help you get Blazor on your resume... without having to sit through stuff you already know.
Join expert Andrew Stellman, author of the popular book Head First C#, to get a practical and results-oriented introduction to web app development with C# and Blazor—no prior web development experience necessary. By the end of this fast-paced course, you'll be able to build—and understand!—complex, full-stack web applications in C# and Blazor.
What you’ll learn and how you can apply it
By the end of this live online course, you’ll understand:
- The fundamentals of building web applications with Blazor
- How minimal HTTP APIs work in .NET Core, and how to call them from Blazor apps
- “Just enough to be dangerous” web design
And you’ll be able to:
- Design interactive web pages that use C# code
- Develop an interactive Blazor web application from the ground up
- Create simple full-stack web applications with .NET web APIs
This live event is for you because...
- You’re a C# developer with some experience building basic desktop applications or ASP.NET web applications.
- You want to keep up to date with the latest .NET web technology.
- You want to build professional-quality full stack web applications.
Prerequisites
- A computer with Visual Studio 2022 (Windows) or Visual Studio 2019 (Mac) installed
- A working knowledge of C#
Recommended preparation:
- Read “Start Building with C#” and “Visual Studio for Mac Learner’s Guide” (chapter 1 and appendix in Head First C#, fourth edition)
Recommended follow-up:
- Read Learning Blazor (book)
- Read Web Development with Blazor (book)
- Watch Exploring Blazor: Understanding Its Essentials and Navigation (video course)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Web layout basics: Web pages that use C# (65 minutes)
- Presentation: Spinning up a Blazor web application; review of Bootstrap rows, columns, and controls; using your class in a web page; code, data binding, and debugging in Visual Studio
- Group discussion: What did we just do?
- Hands-on exercises: Create a new Blazor web application; add a new button to the counter page
- Q&A
- Break
A simple game (40 minutes)
- Presentation: The UI design and C# code for the math quiz game you’ll build
- Group discussion: How do C# classes get data into and out of controls on the page?
- Hands-on exercise: Download the code and finish the game
Animal matching game project: Part I (25 minutes)
- Presentation: Creating a larger Blazor project (Head First C# animal matching game)
- Hands-on exercise: Download the starting project code, start it up in Visual Studio, and make sure it runs
- Q&A
- Break
Animal matching game: Part II—mouse clicks (30 minutes)
- Presentation: Handling events in Blazor (and how to do it in the animal matching game)
- Group discussion: How to find other events beyond mouse clicks
- Hands-on exercise: Add the event handling code to your app
- Q&A
Animal matching game: Part III—responding to external events (35 minutes)
- Presentation: “Something beside the user has interrupted your flow”—updating the page state with StateHasChanged; using a Timer to trigger updates
- Group discussion: When do I need to tell Blazor the state has changed, and when does it automatically update?
- Hands-on exercise: Add a timer to your project
- Q&A
- Break
Animal matching game: Part IV—going full stack (45 minutes)
- Presentation: Creating an HTTP service using minimal APIs; getting your Blazor page to access an API
- Group discussion: What goes in the frontend and what goes in the backend?
- Hands-on exercise: Use an API to save the best score to a file
- Q&A
Your Instructor
Andrew Stellman
Andrew Stellman is a full-time software developer and team lead who’s passionate about writing great code. He’s the author of many books and reports published by O’Reilly, including Beautiful Teams, Learning Agile, and five editions of Head First C#. Andrew has been writing books and training people on software development, agile, project management, and other technical topics for over 20 years.