.NET Tools
Essential productivity kit for .NET and game developers
.NET Annotated Monthly | August 2021
Did you know? The first computer mouse was invented in 1964 and was made of wood. Indeed, it was! We’ve come a long way since then. Nowadays, computer mice are made with acrylonitrile butadiene styrene (ABS) plastic and are quite advanced when compared to early models.
.NET news
- .NET Foundation Election 2021 Nominations are Open!
- Announcing .NET 6 Preview 6
- Announcing .NET MAUI Preview 6
- Migration of Bing’s Workflow Engine to .NET 5
- Try the new System.Text.Json source generator
Featured Content
Testing Web APIs or Services with JetBrains Rider – We love when Rider is able to help streamline the development process. In this case, Rider is helping Joe Guadagno to test Web APIs and services.
What Is WebAssembly — and Why Are You Hearing So Much About It? – So many folks who use .NET are using Blazor, and the WASM in Blazor WASM is for WebAssembly. But WebAssembly is for so much more than just Blazor development, and that’s why this piece is a “must read”. Mary Branscombe has written this excellent article detailing what you need to know about the underlying WebAssembly technology, its relationship to Blazor and other web development technologies, and why and how WebAssembly may fit into your development toolbox.
Tutorials and articles
.NET tutorials
- Using Reflection to Set a Private Property in C# – Ilyana shows the often needed technique of reflection, and how to use it to set a private property in C#.
- Anthony Giretti’s C# 10 posts – This is a great collection of posts about features in C# 10 for the month of July.
- Using Azure Cosmos DB as an ASP.NET session state and caching provider – Matias Quaranta
- Thoughts on Async/Await Conversion in a Desktop App – Async isn’t always for web apps. Rick Strahl has detailed his journey in writing async code in a desktop app, as well as some common async issues that might arise.
- How to Toggle Functionality in C# with Feature Flags – Feature flags are a great technique for managing what gets shipped in various editions or versions of software. Feature flags are one way to make software product lines possible. So check out this post by Gergely Sinka demonstrating how to code them.
- C# Language Highlights – Exhaustive Language Guards – Cecil Phillip & David Pine show how to use exhaustive language guards in C# in this excellent video from CH 9.
- Onion Architecture in ASP.NET Core – Onion architecture is a layered architecture that visualizes the domain, service, infrastructure, and presentation layers as concentric circles that bring to mind the idea of an onion’s layers. Code Maze describes using onion architecture (also known as clean or ports and adapters) in ASP.NET.
- Using app secrets in #dotnetcore console applications – Yes, indeed, folks do create console apps. A minimal UI is a common requirement for such apps. So check out thise post where Santosh Hari shows us how to use app secrets in a .NET console app.
- Develop Clean Command Line Applications with System.CommandLine. Clean CLI. – Here’s more command line info. This time, Oleksii Nikiforov shows how to build apps the clean way with the System.CommandLine utility.
- Domain-Driven Refactoring: Long Methods – Don’t forget to use Rider for refactoring! But if you’re unsure what to refactor, check out Jimmy Bogard’s post on breaking down long methods.
- Protect Your SignalR Service Based Real-time Application with Application Gateway – The AAG is a load balancer and traffic manager for web applications. Yan Jin reviews how the Azure Application Gateway can help add a level of protection for your app.
- Sure, you could write all those Blazor HTTP calls yourself… – Jon Hilton demonstrates how to use Refit rather than repeating boilerplate code all the time.
- Transforming your Asp.Net Core MVC app into a PWA – Converting from web to PWA is becoming quite the pastime for developers, because businesses often want to move in that direction. Bruno Sonnino gives us a look at how we can convert our apps.
- How Does the StringBuilder Work in .NET? (Part 2) (In case you missed it How Does the StringBuilder Work in .NET? (Part 1)) – Steve Gordon shows us more than we ever thought we’d need to know, but do really need to know about the StringBuilder object in .NET.
- Blazor Forms and Form Validation (Built-in & Custom): A Beginner’s Guide – Catch this nice tutorial by Ankit Sharma showing how to do forms validation in Blazor; two ways.
- How to create a Discord Bot using the .NET worker template and host it on Azure Container Instances – Niels Swimberghe demonstrates how to create Discord bots with .NET and Azure.
- Put That Microservice Down – This is a great rundown by George Stocker about why you might not want to jump on the microservices bandwagon. There’s always a time and a place for things, and George shows when it’s time for microservices and when it’s not.
- C# tip: String.IsNullOrEmpty or String.IsNullOrWhiteSpace? – A quick post by Davide Bellone on these string testing choices.
Related programming tutorials
- Best practices for writing code comments – Comments don’t seem like much, until you rely on one for important information about why someone wrote the code in the way they did. So definitely read this article where Ellen Spertus comments about the best way to comment code.
- Building A Dynamic Header With Intersection Observer – Have you ever wanted to implement infinite scrolling or dynamic headers? Well you’re in luck, as Michelle Barker has written how to do just that.
- CSS Grid Cheat Sheet – We can always use a good CSS cheat sheet. By Mariana Simon.
- Refactoring CSS: Introduction (Part 1) – Yes, CSS needs refactoring too. Many selectors can be combined, and like C# or imperative code, there are unused lines and many of the same issues. Adrian Bece reviews refactoring CSS.
- Feature Flags Shift The Balance Of Power Away From Designers – Another great piece on feature flags, but this time, how it shifts power to developers from designers. Post by Ben Nadel.
- Code opinion: performance or clean code? – Davide Bellone reviews which is better, performance or clean code? Or is there a compromise to be had? Read more to find out.
- Three Insights I Gained While Researching Vue.js Accessibility – Marcus Herrmann writes about the insights gained (oh there are many) while researching accessibility features in client front ends such as Vue.
- Using CASE Expression in Default Value – Devs often turn to SQL for a bit of logic occasionally, and Pinal Dave shows us a quick way to do CASE (switch case) expressions in SQL.
- Move Fast and Don’t Break Things: How to Modernize Your SDLC – Looking to tweak your dev process? Check out this piece by Daniel Odio giving a few nice tips on how to improve your SDLC.
- Functional Programming with JavaScript – JavaScript is a language that treats functions as first class entities, so you can do a lot of really nice functional work in it. But how? Leonardo Maldonado shows us.
- API vs. Microservices: A Beginners Guide to Understand Them – Jaden Baptista draws the line between APIs and microservices by describing what exactly each are and how they can be architected together.
Tweet tips
Here’s a short thread by Kent Beck for those getting started with TDD, or those who want to share this with the junior devs on the team.
Let’s say you interested in TDD but you just can’t figure out how to write a test before you write the code. Here’s a foolproof exercise that let’s you experience the TDD workflow in spite of that block:
— Kent Beck (@KentBeck) July 30, 2021
Paul nails it with this tweet. Make sure you know config & logging if you’re an ASP.NET Core developer.
I feel like you’ve really done yourself a disservice if you are using ASP .NET Core — but haven’t made time to really understand how the configuration and logging subsystems work.#DotNet #csharp #fsharp
— Paul Blasucci (@pblasucci) August 2, 2021
Interesting and cool stuff
- Responding to a Developer Conference CFP – JetBrains Java advocate Helen Scott has created this excellent article on everything you need to know about the CFP (Call for Papers) to get accepted into that conference of your dreams.
- What I learned from Software Engineering at Google – An interesting piece by Swizec Teller about their time at Google. Lessons learned are always informative.
- Charge your Tesla automatically with Raspberry Pi – Ashley Whittaker goes full IoT by charging a Tesla with Raspberry Pi. Note to self: You need another Raspberry Pi and to buy a Tesla.
This happens every time…
“Just read the docs.” #100DaysOfCode pic.twitter.com/VTTSCel3tg
— Chuck Norris (@chuckchucknock) July 16, 2021
You’ll groan. But you’ll laugh too. Unless you’re a JavaScript dev, then you won’t Node how to React. :D
How do you know a JavaScript developer is surprised?
— Lou (@lovelacecoding) July 23, 2021
They don’t Node how to React
And finally, the latest from JetBrains
Here’s a chance to catch up on JetBrains news that you might have missed:
Do you use dotTrace or dotMemory? Then take our survey and get a reward for sharing your dotTrace or dotMemory experience!
Check out our .NET Guide with tutorials, tips, and lots of .NET resources!
New releases!
- Rider 2021.2: Support for ASP.NET Core Endpoints, Blazor WebAssembly Debugging, and More
- ReSharper 2021.2: Updates to C# Code Analysis, Nullable Reference Types, and Source Generators and Introducing HttpClient URI Support!
- The v2021.2 Releases for dotCover, dotMemory, dotTrace, and dotPeek Are Here!
Blog posts, webinars, and OSS Power-Ups
- OSS Power-Ups: Statiq
- SpecFlow for Rider (Plugin) is now Available!
- Blazor Debugging Improvements in Rider 2021.2
- ReSharper 2021.1.5 and Rider 2021.1.5 Released
- Webinar: Supercharge Your ASP.NET Core Applications
- Getting Started with ASP.NET Core and gRPC
- OSS Power-Ups: Verify – Webinar Recording
- A Better Way To Discover APIs With The New Endpoints Window
Check out this fantastic offer! CODE Magazine is offering a free subscription to JetBrains customers!
Sharing is caring! So share your content with other readers. Don’t keep it to yourself! Send a Tweet or email with tips or content for publication in future newsletters! Share with a comment here, email me at rachel.appel@jetbrains.com, or drop me a message via Twitter.