Roundup #68: Binding Redirects, Combining Types as Effects to Describe an Application, Endpoint from multiple middleware, Clean Architecture

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Binding Redirects

You’re probably here because of an error like this:

Could not load file or assembly ‘System.<…>, Version=4.x.x.x, Culture=neutral, PublicKeyToken=<…>’ or one of its dependencies. The system cannot find the file specified.

And you likely saw a build warning like this:

warning MSB3277: Found conflicts between different versions of “System.<…>” that could not be resolved.

Whelp, you’re not alone. We’re thinking about starting a survivors group.

If someone starts a survivors group, I’m joining. I’ve spent a serious amount of time and head-scratching over binding redirects. Specifically around System.Net.Http. The answer in my case was using <AutoGenerateBindingRedirects>

Link: https://nickcraver.com/blog/2020/02/11/binding-redirects/

Combining Types as Effects to Describe an Application

I can only imagine the face I made the first time someone referred to the type of an application. Coming from a Delphi, .NET, and web background at the time, I assumed the type of an application was Web vs Desktop vs Command Line. What I came to understand was that types can be used to model effects which can then determine what your application does.

Reid pointed out this post he wrote after I posted the following tweet (and my typo of “ton”… oops). I highly recommend reading this as Reid points out something I’ve never really thought of before.

Link: https://medium.com/@reidev275/combining-types-as-effects-to-describe-an-application-5830a1c48c05

Creating an endpoint from multiple middleware in ASP.NET Core 3.x

In a recent post I discussed the changes to routing that come in ASP.NET Core 3.0, and how you can convert a “terminal” middleware to the new “endpoint” design. One question I’ve received is whether that removes the need for “branching” the pipeline, and if not, how can you achieve the same thing with endpoints?

This short post assumes that you’ve already read my post on converting a terminal middleware to endpoint routing, so if you haven’t already, take a look at that one first! I give a quick recap below, but I won’t go into details.

Link: https://andrewlock.net/creating-an-endpoint-from-multiple-middleware-in-aspnetcore-3/

The Clean Architecture – Ian Cooper

What is the clean architecture and how you would build one in .NET? Recently Bob Martin has categorized a set of architectures, including hexagonal architecture, onion architecture and screaming architecture as ‘the clean architecture’ – a layered architecture of concentric circles with a strong emphasis on separation of concerns. This architecture has become popular because of its amenability to modification as an evolutionary architecture and its support for practices such as TDD. In this presentation we will discuss the clean architecture and its benefits. More than that, in the bulk of the presentation, we will show you how to implement a clean architecture in .NET. From first steps to working code, we will show you the moves required to embrace this approach, and introduce you to some of the OSS libraries that can help you get there. All examples will be in .NET Core

Link: https://www.youtube.com/watch?v=SxJPQ5qXisw

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #67: Cert Expiration Check, Should I use MicroServices? StackOverflow Survey, gRPC-Web

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Certificate Expiration Check

I thought this was a pretty cool idea and an easy way to keep track of expiring certs.

Link: https://github.com/ardalis/CertExpirationCheck

Should I Use A Microservices Architecture?

Are you considering adopting a microservices architecture? Won’t it fix all your problems? Join me for a look into the realities of microservices!

Link: https://www.jamesmichaelhickey.com/microservices-architecture/

2020 Stack Overflow Developer Survey

Thank you for taking the 2020 Stack Overflow Developer Survey, the largest and most comprehensive survey of software developers (and anyone else who codes!) on Earth. 

Link: https://stackoverflow.az1.qualtrics.com/jfe/form/SV_eL0mFVwuo7KWeXP

A new experiment: Call .NET gRPC services from the browser with gRPC-Web

I’m excited to announce experimental support for gRPC-Web with .NET. gRPC-Web allows gRPC to be called from browser-based apps like JavaScript SPAs or Blazor WebAssembly apps.

gRPC-Web for .NET promises to bring many of gRPC’s great features to browser apps:

Strongly-typed code-generated clients
Compact Protobuf messages
Server streaming

Link: https://devblogs.microsoft.com/aspnet/grpc-web-experiment/

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #66: Capturing the World in Software, Conventional, Polymorphic classes with System.Text.Json, Blazor WebAssembly 3.2.0 Preview 1

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Capturing the World in Software

If event sourcing is not scalable, faster, or simpler, why use it?

Event Sourcing gives you a complete, consistent model of the slice of the world modeled by your software. That’s pretty attractive.

Link: https://blog.jessitron.com/2020/01/24/capturing-the-world-in-software/

Conventional

After this tweet by Dave Glick, I found this package that I thought was pretty interesting. Check out the twitter thread for a lot of good info.

Link: https://github.com/andrewabest/Conventional

Deserializing JSON into polymorphic classes with System.Text.Json

While working on SpaceDotNet, a strong-typed client SDK to access the JetBrains Space HTTP API, I came across a scenario to deserialize JSON into polymorphic classes. In this post, I’ll explain how to write a custom JsonConverter for System.Text.Json to help with deserialization for such cases.

Link: https://blog.maartenballiauw.be/post/2020/01/29/deserializing-json-into-polymorphic-classes-with-systemtextjson.html

Blazor WebAssembly 3.2.0 Preview 1 release now available

Today we released a new preview update for Blazor WebAssembly with a bunch of great new features and improvements.

Here’s what’s new in this release:

  • Version updated to 3.2
  • Simplified startup
  • Download size improvements
  • Support for .NET SignalR client

Link: https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-1-release-now-available/

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.