The .NET Stacks #21: Azure Static Web Apps, .NET 6 feedback, and more!

This week, we take a look at Azure Static Web Apps, dotnet-monitor, and more.

Dave Brock
Dave Brock

Happy Monday! It looks like my pun from last week received some attention (and some new subscribers). I’m glad you all joined the newsletter before it gets code outside.

This week:

  • Catch up on Azure Static Web Apps
  • Provide input on .NET 6
  • Last week in the .NET world

⛅ Catch up on Azure Static Web Apps

This week, Anthony Chu joined the ASP.NET community standup to talk about Azure Static Web Apps. Azure Static Web Apps has been at the top of my “I really need to take a look at this” list, so the timing was right. 😎

Static sites are definitely the new hotness, and have been for awhile. If content on your site doesn’t change that often, you’ll just need to serve up some static HTML files. For example, on my site I utilize a static site generator called Jekyll and host the content on GitHub Pages—this helps my site load super fast and with little overhead. Why introduce database overhead and the like if you don’t need it? (If it wasn’t clear I’m talking about you, WordPress.)

Many times, though, you’ll also need to call off to an API eventually—this is quite common with SPAs like Vue, Angular, React, and now Blazor: you have a super-lightweight front-end that calls off to some APIs. A common architecture is serving up files statically with a serverless backend, such as Azure Functions.

Enter Azure Static Web Apps. Introduced at Ignite this year, Azure Static Web Apps allow you to leverage this architecture with one easy solution. If you’re good with GitHub lock-in and are looking for a static hosting solution, it’s worth a look.

You can check out the docs for the full treatment, but Azure Static Web Apps offers web hosting (duh), native Azure Functions support, GitHub triggers over GitHub Actions, free renewable SSL certificates, custom domains, and a bunch of auth integrations, and fallback routes.

My favorite feature is GitHub PR testing sites. Once a PR kicks off, a GitHub Action executes and creates a temporary test staging site to view changes (it goes away once the PR is merged or discarded). This is a wonderful tool for you and others to test any changes to your app. Are you working on a complicated PR and want to have testers put your app through its paces? Send them the staging link.

It’s nice to have all this integrated in Azure, especially if that’s where you do a lot of business. But why not just use GitHub Pages if you don’t have a lot of complexity? That’s a fair question. With the just announced Blazor Web Assembly support, Azure Static Web Apps is the clear winner. With Azure Static Web Apps, the GitHub Actions step becomes aware of a Blazor WebAssembly app and can do Blazor-specific precompression steps. Otherwise, you’d have to integrate an additional workflow to your app. With Azure Static Web Apps, it’s available out of the box.

👨‍💻 Provide input on .NET 6

With the general release of .NET 5 not even a month away, Microsoft is setting its sights on .NET 6.

Check out this GitHub issue to provide feedback on what features you want to see. Unsurprisingly, Blazor AoT compilation is leading the charge. As a whole, the ASP.NET folks have noted that speeding up the developer feedback loop is a big priority for .NET 6.

🎂 Happy birthday, Mom

Before we get into the links: I quickly wanted to wish my mom a very Happy Birthday, as she turns … 30? I love you, Mom. And to think I would never get you back for all the embarrassing moments.

Here’s a picture of us when I was young. I think she’s trying to convince me to use Kubernetes.

Picture with mom

🌎 Last week in the .NET world

🔥 The Top 3

📢 Announcements

📅 Community and events

😎 ASP.NET Core / Blazor

⛅ The cloud

📔 C#

📗 F#

🔧 Tools

📱 Xamarin

🎤 Podcasts

🎥 Videos

.NET Stacks