The .NET Stacks #32: 😎 SSR is cool again
This week, we talk about SSR and Xamarin.Forms 5.0.
Good morning and happy Monday! We’ve got a few things to discuss this week:
- The new/old hotness: HTML over the wire
- Xamarin.Forms 5.0 released this week
- Quick break: how to explaining C# string interpolation to the United States Senate
- Last week in the .NET world
The new/old hotness: server-side rendering
Over the holidays, I was intrigued by the release of the Hotwire project, from the folks at Basecamp:
Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire. This makes for fast first-load pages, keeps template rendering on the server, and allows for a simpler, more productive development experience in any programming language, without sacrificing any of the speed or responsiveness associated with a traditional single-page application.
Between this and other tech such as Blazor Server, the “DOM over the wire” movement is in full force. It’s a testament to how bloated and complicated the front end has become.
Obviously, rendering partial HTML over the wire isn’t anything new at all—especially to us .NET developers—and it’s sure to bring responses like: “Oh, you mean what I’ve been doing the last 15 years?” As much as I enjoy the snark, it’s important to not write it off as the front-end community embracing what we’ve become comfortable with, as the technical details differ a bit—and we can learn from it. For example, it looks like instead of Hotwire working with DOM diffs over the wire, it streams partial updates over WebSocket while dividing complex pages into separate components, with an eye on performance. I wonder how Blazor Server would have been architected if this was released 2 years ago.
Xamarin.Forms 5.0 released this week
This week, the Xamarin team released the latest stable release of Xamarin.Forms, version 5.0, which will be supported through November 2022. There’s updates for App Themes, Brushes, and SwipeView, among other things. The team had a launch party. Also, David Ramel writes that this latest version drops support for Visual Studio 2017. Updates to Android and iOS are only delivered to 2019, and pivotal for getting the latest updates from Apple and Google.
2021 promises to be a big year for Xamarin, as they continue preparing to join .NET 6—as this November, Xamarin.Forms evolves into MAUI (the .NET Multi-Platform App UI). This means more than developing against iPhones and Android devices, of course. With .NET 6 this also includes native UIs for iOS, Android, and desktops. As David Ramel also writes, Linux will not be supported out of the gate and VS Code support will be quite limited.
As he also writes, in a community standup David Ortinau clarifies that MAUI is not a rewrite.
So my hope and expectation, depending on the complexity of your projects, is you can be up and going within days … It’s not rewrites – it’s not a rewrite – that’s probably the biggest message that I should probably say over and over and over again. You’re not rewriting your application.
Quick break: how to explain C# string interpolation to the United States Senate
Did I ever think C# string interpolation would make it to the United States Senate? No, I most certainly did not. But last month, that’s what happened as former Cybersecurity and Infrastructure Security Agency (CISA) head Chris Krebs explained a bug:
It’s on page 20 … it says ‘There is no permission to {0}’. … Something jumped out at me, having worked at Microsoft. … The election-management system is coded with the programming language called C#. There is no permission to {0}’ is placeholder for a parameter, so it may be that it’s just not good coding, but that certainly doesn’t mean that somebody tried to get in there a 0. They misinterpreted the language in what they saw in their forensic audit.
It appears that the election auditors were scared by something like this:
Console.WriteLine("There is no permission to {0}");
To us, we know it’s just a log statement that verifies permission checks are working. It should have been coded using one of the following lines of code:
Console.WriteLine("There is no permission to {0}", permission);
Console.WriteLine($"There is no permission to {permission}");
I’m available to explain string interpolation to my government for a low, low rate of $1000 an hour. All they had to do was ask.
🌎 Last week in the .NET world
🔥 The Top 4
- Josef Ottosson works with polymorphic deserialization with
System.Text.Json
. - Shahed Chowdhuri works with init-only setters in C# 9.
- Khalid Abuhakmeh writes about EF Core 5 interceptors.
- Over at the AWS site, the folks at DraftKings have a nice read about modernizing with .NET Core and AWS.
📢 Announcements
- WinUI 3 Preview 3 has been released.
- David Ortinau announces the arrival of Xamarin.Forms 5.0.
- Microsoft Learn has a new module on learning Python.
- James Newton-King releases a new Microsoft doc, Code-first gRPC services and clients with .NET.
- Phillip Carter brings attention to a living F# coding conventions document.
- Patrick Svensson releases version 0.37 of
Spectre.Console
. - The Azure SDK team released new .NET packages to simplify migrations using
Newtonsoft.Json
and/orMicrosoft.Spatial
. - The EF Core team releases
EFCore.NamingConventions
5.0.1, which fixes issues with owned entities and table splitting in 5.0.0.
📅 Community and events
- Chris Noring introduces GitHub’s web dev for beginners tutorials.
- Niels Swimberghe rolls out two utilities written in Blazor: a GZIP compressor/decompressor, and a .NET GUID generator.
- ErikEJ writes about some free resources for EF 5.
- The Xamarin community standup is a launch party for Xamarin.Forms 5.
- The .NET Docs Show talks to co-host David Pine about his localization project.
- Shahed Chowdhuri previews a new C# A-Z project and a Marvel cinematic visualization app.
- Chris Woodruff kicks of an ASP.NET 5 Web API blog series.
- VS Code Day is slated for January 27.
🌎 Web development
- Peter Vogel writes about displaying lists efficiently in Blazor.
- Over at Code Maze, using the API gateway pattern in .NET to encapsulate microservices.
- David Fowler notes that web socket compression is coming to .NET 6.
- Chris Noring manages configuration in ASP.NET Core.
- Marinko Spasojevic signs in with Google using Angular and ASP.NET Core Web API.
- Damien Bowden works with Azure AD access token lifetime policy management in ASP.NET Core.
- Paul Michaels views server variables in ASP.NET Core.
- Sahan Serasinghe writes about using Web Sockets with ASP.NET Core.
🥅 The .NET platform
- Richard Reedy talks about the Worker Service in .NET Core.
- Marco Minerva develops desktop apps with .NET 5.
- Jimmy Bogard works with ActivitySource and ActivityListener in .NET 5.
- Nikola Zivkovic introduces machine learning with ML.NET.
- Nick Randolph works with missing files in a multi-targeted project.
- Stefan Koell writes about migrating Royal TS from WinForms to .NET 5.
⛅ The cloud
- Andrew Lock auto-assigns issues using a GitHub Action.
- Richard Reedy builds a chatbot to order a pizza.
- Dave Brock uses the Microsoft Bot Framework to analyze emotion with the Azure Face API.
- Jonathan Channon uses GCP Cloud Functions with F#.
- Justin Yoo writes about using Azure EventGrid.
- Mark Heath writes about bulk uploading files to Azure Blob Storage with the Azure CLI.
- Daniel Krzyczkowski continues his series on writing an ASP.NET Core API secured by Azure AD B2C.
- Paul Michaels schedules message delivery with Azure Service Bus.
📔 Languages
- Rick Strahl works with blank zero values in .NET number format strings.
- David McCarter analyzes code for issues in .NET 5.
- Khalid Abuhakmeh plays audio files with .NET.
- Daniel Bachler talks about what he wishes he knew when learning F#.
- Michał Niegrzybowski writes about signaling in WebRTC with Ably and Fable.
- Mark-James McDougall talks about why he’s learning F# in 2021.
🔧 Tools
- Jason Robert creates a serverless Docker image.
- Stephen Cleary kicks off a series around asynchronous messaging.
- Michał Białecki recaps useful SQL statements when writing EF Core migrations.
- Derek Comartin splits up a monolith into microservices.
- Frank Boucher creates a CI/CD deployment solution for a Docker project.
- Alex Orlov writes about using TLS 1.3 for IMAP and SMTP connections through Mailbee.NET.
- Brad Beggs writes about using vertical rulers in VS Code.
- Tim Cochran writes about maximizing developer effectiveness.
📱 Xamarin
- David Ramel writes how Xamarin.Forms won’t be on Linux or VS Code for MAUI in .NET 6, and also mentions that Xamarin.Forms 5 is dropping Visual Studio 2017 support.
- Leomaris Reyes writes about Xamarin Essentials.
- Anbu Mani works with infinite scrolling in Xamarin.Forms.
- Matthew Robbins embeds a JS interpreter into Xamarin apps with Jint.
🎤 Podcasts
- Scott Hanselman talks to Amanda Silver about living through 2020 as a remote developer.
- The 6-Figure Developer Podcast talks with Phillip Carter about F# and functional programming.
- The Azure DevOps Podcast talks with Sam Nasr about SQL Server for developers.
🎥 Videos
- Visual Studio Toolbox talks about the Azure App Insights Profiler.
- The ASP.NET Monsters talk with Andrew Stanton-Nurse.
- Gerald Versluis secures a Xamarin app with fingerprint or face recognition.
- James Montemagno makes another Xamarin.Forms 101 video.
- At Technology and Friends, David Giard talks to Javier Lozano about virtual conferences.
- Jeff Fritz works on ASP.NET Core MVC and also APIs with ASP.NET Core.
- ON.NET discusses cross-platform .NET development with OmniSharp.