Roundup #40: Workers, NET 4.8, Require 4.7.2, AWS SDK, Developer Survey

Been out several weeks from posting a roundup, but it’s back!

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

.NET Core Workers as Windows Services

In .NET Core 3.0 we are introducing a new type of application template called Worker Service. This template is intended to give you a starting point for writing long running services in .NET Core. In this walkthrough we will create a worker and run it as a Windows Service.

I think this is pretty great and seems really logical. There are so many use cases and the most obvious to me is long running process for something like processing jobs off a queue.

Link: https://devblogs.microsoft.com/aspnet/net-core-workers-as-windows-services/

Announcing the .NET Framework 4.8

We are thrilled to announce the release of the .NET Framework 4.8 today. It’s included in the Windows 10 May 2019 Update. .NET Framework 4.8 is also available on Windows 7+ and Windows Server 2008 R2+.

I realize there have been many posts about .NET Framework not being “dead” because it’s built into Windows, but “dead” to me clearly means something different. There is a lot of effort being put into being able to migrate to .NET Core. The future is .NET Core. Is the .NET Framework going anywhere? No, but don’t expect much else beyond 4.8 in my opinion.

Link: https://devblogs.microsoft.com/dotnet/announcing-the-net-framework-4-8/

Require .NET Framework 4.7.2

This shows how you can author a NuGet package that will provide an error message if the consumer is on .NET Framework 4.6.1 – 4.7.1.

Unfortunately, this is needed because NuGet will allow you to install a package on 4.6.1+ when netstandard2 is really only truly supported on 4.7.2. This is an unfortunate mistake and guidance early on that caused a pile of confusion.

Link: https://github.com/terrajobst/require-net472/

AWS SDK for .NET now targets .NET Standard 2.0

As .NET Core and .NET Standard have matured since their initial release, Microsoft has been encouraging the community to set the baseline for .NET Standard libraries to be 2.0. .NET Standard 2.0 improves how dependencies are resolved. Taking a dependency on library that does not target .NET Standard 2.0 potentially caused confusing build errors or required unnecessary .NET assemblies in project deployment packages.

Link: https://aws.amazon.com/de/blogs/developer/aws-sdk-for-net-now-targets-net-standard-2-0/

Stack Overflow Developer Survey Results 2019

Stack Overflow’s annual Developer Survey is the largest and most comprehensive survey of people who code around the world. Each year, we field a survey covering everything from developers’ favorite technologies to their job preferences. This year marks the ninth year we’ve published our annual Developer Survey results, and nearly 90,000 developers took the 20-minute survey earlier this year.

Link: https://insights.stackoverflow.com/survey/2019

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #39: Performance Tricks, Orleans Dashboard, ASP.NET Tips, Six Little Lines of Fail

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

Some performance tricks with .NET strings

I’ve created a pull request on the ASP.NET Core repository. At the beginning, the changes were just about changing the unsafe code (char*) for stackalloc to a safe version with Span<T>. So, it was a very small change. During the review, Oleksandr KolomiietsGünther Foidl, and David Fowler have suggested a few additional changes to improve the performance. Thank you very much for taking the time to review the PR! The comments were very interesting, so I’ve decided to explain them in a post.

Link: https://www.meziantou.net/2019/03/04/some-performance-tricks-with-net-strings

Microsoft Orleans   Dashboard

Quick update to a post I did a while back regarding Orleans Dashboard — additional reporting metrics for your cluster!

As a refresher, Orleans is a virtual actor model framework — a framework that can be used to build new, distributed “primitives”. These primitives’ work can be farmed out to a cluster of nodes as a means of getting “work” done faster than what would be possible if working constrained to a single piece of hardware.

Link: https://hackernoon.com/microsoft-orleans-dashboard-update-cpu-memory-stats-706daed82cf8

Tips and tricks for ASP.NET Core applications

This is a small collection of some tips and tricks which I keep repeating myself in every ASP.NET Core application. There’s nothing ground breaking in this list, but some general advice and minor tricks which I have picked up over the course of several real world applications.

Link: https://dusted.codes/advanced-tips-and-tricks-for-aspnet-core-applications

Six Little Lines of Fail – Jimmy Bogard

It seemed like an easy feature to implement, a checkout page to place an order. But this payment gateway has a simple API, so we added that. And this email service provider makes it possible to send an email with one line of code! Finally we can notify downstream systems via a message queue. The code looks simple, 6 little lines of distributed systems code.

But those lines hid a dark secret that we only found after launching. Customers complained they didn’t get their email. The back end system wasn’t getting updated from our messages. And by far the worst of all, customers complained they saw an error page but still got charged!

Clearly it wasn’t as easy as calling a few APIs and shipping, we actually need to worry about those other systems. In this session, we’ll look at taking our 6 lines of distributed systems fail, examining the inevitable failures that arise, and possible mitigating scenarios. We’ll also look at the coupling our code contains, and the ways we can address it. Finally, we’ll refactor towards a truly resilient checkout process that embraces, instead of ignoring, the fallacies of distributed computing.

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

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #38: Port Desktop App to .NET Core 3, Building 300+ csproj, .NET Core 3 Progress, Four Languages from Forty Years Ago

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

How to port desktop applications to .NET Core 3.0

In this post, I will describe how to port a desktop application from .NET Framework to .NET Core. I picked a WinForms application as an example. Steps for WPF application are similar and I’ll describe what needs to be done different for WPF as we go. I will also show how you can keep using the WinForms designer in Visual Studio even though it is under development and is not yet available for .NET Core projects.

Link: https://devblogs.microsoft.com/dotnet/how-to-port-desktop-applications-to-net-core-3-0/

How do you all build really large .NET repos (like more than 300 .csproj)?

This is a really interesting thread. I can’t imagine building 300+ projects. I currently have a solution with just around 50 and I’m always trying to reduce it. What type of projects are people working that require 300+ projects?

Link: https://twitter.com/natemcmaster/status/1099021447920406529

.NET Core 3.0 Progress on Bugs

Link: https://twitter.com/ziki_cz/status/1100865306484850688

Four Languages from Forty Years Ago – Scott Wlaschin

The 1970’s were a golden age for new programming languages, but do they have any relevance to programming today? Can we still learn from them?

In this talk, we’ll look at four languages designed over forty years ago — SQL, Prolog, ML, and Smalltalk — and discuss their philosophy and approach to programming, which is very different from most popular languages today.

We’ll come away with some practical principles that are still very applicable to modern development. And you might discover your new favorite programming paradigm!

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

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.