Roundup #60: gRPC vs HTTP APIs, .NET Perception, Rider, WebWindow

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.

gRPC vs HTTP APIs

ASP.NET Core now enables developers to build gRPC services. gRPC is an opinionated contract-first remote procedure call framework, with a focus on performance and developer productivity. gRPC integrates with ASP.NET Core 3.0, so you can use your existing ASP.NET Core logging, configuration, authentication patterns to build new gRPC services.

Link: https://devblogs.microsoft.com/aspnet/grpc-vs-http-apis/

Perception of .NET

I thought this thread was fascinating. Very interesting to read some of the responses.

Link: https://twitter.com/joepetrakovich/status/1195941775342493696

Rider with Kirill Skrygan

In this episode I interviewed Kirill about Rider and ReSharper from JetBrains. Some of you may know Kirill from his work on both the ReShrarper and Rider projects, and some of his work on the JetBrains open source projects.

Link: https://dotnetcore.show/episode-38-rider-with-kirill-skyrgan/

Meet WebWindow, a cross-platform webview library for .NET Core

My last post investigated ways to build a .NET Core desktop/console app with a web-rendered UI without bringing in the full weight of Electron. This seems to have interested a lot of people, so I decided to upgrade it to newer technologies and add cross-platform support.

The result is a little NuGet package called WebWindow that you can add to any .NET Core console app. It can open a native OS window (Windows/Mac/Linux) containing web-based UI, without your app having to bundle either Node or Chromium.

I’ve also decoupled it from Blazor. You can now host any kind of web UI inside the window. The repo contains a sample that uses Vue.js, and another that uses Blazor.

Link: https://blog.stevensanderson.com/2019/11/18/2019-11-18-webwindow-a-cross-platform-webview-for-dotnet-core/

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #59: IHostingEnvironment vs IHostEnvironment, Async demystified, Pulumi, Memory management and GC in ASP.NET Core

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.

IHostingEnvironment vs IHostEnvironment – obsolete types in .NET Core 3.0

In this post I describe the differences between various ASP.NET Core types that have been marked as obsolete in .NET Core 3.0. I describe why things have changed, where the replacement types are, and when you should use them.

Link: https://andrewlock.net/ihostingenvironment-vs-ihost-environment-obsolete-types-in-net-core-3/

Async demystified – Karel Zikmund

Do you struggle to understand async/await in C#? How it works and why? I did. So I asked the best – the author of async, Stephen Toub. This talk is summary of the most interesting insights from him that helped me and my colleagues on CoreFX team to finally truly understand the magic behind async/await.

The talk will cover: History and evolution of asynchronous programming patterns in C# and their problems. Leading to async/await and demonstrating the “why” behind its design choices.

Touch on the “how” it works behind the scenes.

Reasons for customizing and hyper-optimizing async for high-performance areas (like Networking stack).

Touch on related building block – ThreadPool.

Hands on sync-over-async pattern and associated problems. Workarounds in your code if you hit it. Potential solutions in future .NET versions.

Link: https://www.youtube.com/watch?v=TgUYcZV-foM

Pulumi 💜 .NET Core

Today we are excited to announce the Preview of .NET Core support for all of your modern infrastructure as code needs. This means you can create, deploy, and manage your infrastructure, on any cloud, using your favorite .NET language, including C#, F#, and VB.NET.

Link: https://www.pulumi.com/blog/pulumi-dotnet-core/

Memory management and garbage collection (GC) in ASP.NET Core

Memory management is complex, even in a managed framework like .NET. Analyzing and understanding memory issues can be challenging. This article:

Was motivated by many memory leak and GC not working issues. Most of these issues were caused by not understanding how memory consumption works in .NET Core, or not understanding how it’s measured.

Demonstrates problematic memory use, and suggests alternative approaches.

Link: https://docs.microsoft.com/en-us/aspnet/core/performance/memory?view=aspnetcore-3.0

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #58: Orleans 3.0, Snitch, What’s Your Problem? Next 5 years of ASP.NET Core

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.

Introducing Orleans 3.0

We are excited to announce the Orleans 3.0 release. A great number of improvements and fixes went in, as well as several new features, since Orleans 2.0. These changes were driven by the experience of many people running Orleans-based applications in production in a wide range of scenarios and environments, and by the ingenuity and passion of the global Orleans community that always strives to make the codebase better, faster, and more flexible. A BIG Thank You to all who contributed to this release in various ways!

I was happy to see the generic host for co-hosting with something like ASP.NET Core. I’ve blogged Co-Hosting Orleans and ASP.NET Core which this about this feature.

Link: https://devblogs.microsoft.com/dotnet/orleans-3-0/

Snitch

A tool that helps you find transitive package references that can be removed.

> snitch Foo.csproj --tfm net462

Building Foo (net462)...

Building Bar (netstandard2.0)...

Building Baz (netstandard2.0)...

The following packages can be removed:

Autofac (ref by Baz)

Newtonsoft.Json (ref by Bar)

The following packages might be removed:

Castle.Core (ref by Baz) 4.4.0 <- 4.3.1 (Baz)

Link: https://github.com/spectresystems/snitch

What’s Your Problem? – Asbjørn Ulsberg

A talk given by Asbjørn Ulsberg from PayEx at the 2019 Platform Summit in Stockholm.

An API isn’t stronger than its weakest link and what’s often ignored in the ongoing maintenance and development of an API is the constant effort required to provide great self-servicable error messages. What this means is that without great, user-friendly error messages, your API is not going to be great.

Just think about your first interaction with an API. How many failing requests have you sent before you have dug yourself through swathes of error messages and documentation to get to that one penultimate successful request making your heart sing and fists shaking in the air?

Great error messages make them not feel like errors, but like friendly guidance towards a working request. They should be detailed enough to let the developer fix whatever problem there is themselves, like a dialogue between a customer and a support technician.

This talk will give you ideas of how to handle errors and exceptions that occur in your application, be it with the incoming request, database failures or errors received from a 3rd party and how to serialize them into user friendly and actionable problem messages.

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

The next 5 years of ASP.NET Core – Ryan Nowak

Join Ryan Nowak on a tour of ASP.NET Core’s evolution from “Project K” to present day and look forward to a few possible futures. We’ll discuss technical design details of how the ASP.NET Core stack is changing from bottom (hosting and startup), through the server, middleware pipeline, and up to high-level frameworks like MVC and Blazor.

This is a technical deep-dive talk, and will explore possible design directions of .NET 5 and future releases.

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

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.