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.
- 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.
🌎 Last week in the .NET world
🔥 The Top 3
- Michael Shpilt writes about best practices to keep a .NET app’s memory healthy.
- Patrick Smacchia talks about the new ‘and’ or ‘not’ C# 9 keywords.
- Andrew Lock continues his series on k8s by adding health checks with liveness, readiness, and startup probes.
- David Pine shares an amazing Azure Cosmos DB Repository .NET SDK.
- Tara Overfield runs through the October .NET Framework cumulative update.
📅 Community and events
- The .NET Conf has announced their speakers.
- The GitHub Docs are now open source.
- ESLint offers an interesting perspective on paying contributors.
- The .NET Docs Show talks to Julie Lerman.
- In the .NET community standups: Languages & Runtime talks about source generators, Machine Learning talks about contributing to ML.NET, and ASP.NET talks about Blazor support for Azure Static Web Apps.
😎 ASP.NET Core / Blazor
- Marinko Spasojevic writes about refresh tokens with Blazor WASM and ASP.NET Core Web API.
- Jon Hilton prerenders Blazor WASM with .NET 5, works with Blazor CSS isolation, and updates the HTML head from Blazor components.
- Chris Sainty builds a simple tooltip component in Blazor.
- Peter Vogel works with the Telerik UI for Blazor DataGrid.
- Bogdan Chorniy talks about Blazor form validation internals.
- Khalid Abuhakmeh discusses ASP.NET Razor TagHelpers.
- At the CodeMaze blog, how to publish Angular with ASP.NET Core.
⛅ The cloud
- Derek Legenzoff talks about how you can add search to an app with the new Azure Cognitive Search SDK.
- Damien Bowden uses Key Vault certs with Microsoft.Identity.Web and ASP.NET Core apps.
- Gunnar Peipman runs ASP.NET Core 5 RC apps on Azure App Service.
- Chris Noring deploys a Blazor app with Azure Static Web Apps.
- Matthew Jones works on code blocks, basic statements, and loops in C#, talks about operators in C#, and also works with casting, conversion, and parsing in C#.
- Jason Gaylord exports Bitly links using C#.
- Nick Randolph debugs C# 9 source generators.
- Jennifer Marsh does web scraping with C#.
- Anthony Giretti explores the System.Net.Http.Json namespace in .NET 5.
- Ian Griffiths warns against misusing ‘as’ in C# 8.
- Steve Gordon writes about
System.Threading.Channels.UnboundedChannel<T>(part 1, part 2).
- Kirtesh Shah discusses init-only properties in C# 9.
- Asma Khalid builds web URL query parameters in C#.
- Josef Ottosson tidies up HttpClient usage, and throttles outgoing HTTP requests in C#.
- Bruno Sonnino mocks non-virtual methods of a class.
- Jeremie Chassaing works with applicative computation expressions in F# in two posts.
- Alican Demirtas works with React components in F#.
- James Randall talks about creating FableTrek.
- Callum Linington gets a Node.js experience in F#.
- Dave Brock (ahem) starts a series on Docker for .NET developers.
- Mark Downie discusses cross-platform managed memory dump debugging in Visual Studio, collects dumps with dotnet-monitor, and finds the address of an object in Visual Studio.
- John Petersen discusses interactive unit testing with .NET Core and VS Code.
- Franco Tiveron deploys a .NET container with Azure DevOps.
- Jason Gaylord uses SpecFlow, nUnit and .NET Core in VSCode.
- Scott Hanselman uses autocomplete at the command line for dotnet, git, winget, and more, and also works with panes in Windows Terminal.
- Thomas Ardal compares .NET mocking libraries.
- Mark Seemann doesn’t squash his commits.
- Jon Smith creates a .NET Core global tool.
- Ron Powell asks: do I really need Kubernetes?
- Rick Strahl creates custom .NET project types with dotnet new project templates.
- Michał Białecki configures relationships in Entity Framework Core 5.
- James Montemagno previews Xamarin.Essentials 1.6.
- Jean-Marie Alfonsi works with shadows and MaterialFrame blur.
- Steven Thewissen provides negative numeric input on Xamarin.Forms iOS.
- Nigel Ferrissey writes about when to Use Xamarin.Forms vs Xamarin Native.
- Scott Hanselman talks about normalizing failure with Susana Benavidez.
- .NET Rocks talks about GitHub Codespaces with Anthony van der Hoorn.
- The 6-Figure Developer podcast talks about .NET MAUI with Auri Rahimzadeh.
- The .NET Core Show talks Azure and live conferences with Andy Morrell.