DEV Community

Dave Brock
Dave Brock

Posted on • Originally published at daveabrock.com on

The .NET Stacks #38: šŸ“¢ I hope you like announcements

Newsletter image

It was very busy last week! Letā€™s get right to it.

  • One big thing: .NET 6 gets Preview 1
  • The little things: Dapr v1.0 is released, Azure Static Web Apps, more SolarWinds findings
  • Dev Discussions: Cecil Phillip
  • Last week in the .NET world

One big thing: .NET 6 gets Preview 1

It seems like just yesterday .NET 5 went live. (It was November, for the record.) This week, the .NET team announced .NET 6 Preview 1, to be officially released in November 2021. You can also check out the ASP.NET Core and EF Core 6 announcements. .NET 6 will be an enterprise-friendly LTS release, meaning it will be supported for three years.

As expected, a main focus will be integrating Xamarin into the ā€œOne .NETā€ model by way of the .NET Multi-Platform App UI (MAUI). With Preview 1, Xamarin developers can develop Android and iOS with MAUI. Future previews will address support for macOS and Windows. Another big goal is improving the inner loop experience. You can check out themesof.net to see whatā€™s being prioritized. AOT support is not rolled out yet, but you can head over to the NativeAOT repo to get up to speed.

For ASP.NET Core 6, theyā€™re prioritizing work on hot reload, micro APIs, AoT compilation, updated SPA support, and HTTP/3. For Preview 1, the team now supports IAsyncDisposable in MVC, offers a new DynamicComponent for Blazor to render a component based on type, and applying more nullability annotations.

For EF Core 6, the team is busy with support for SQL Server sparse columns, required property validations for not null for the in-memory database, improved SQL Server translation for IsNullOrWhitespace, a Savepoints API, and much more.

Itā€™s sure to be a busy eight months. Stay tuned.

The little things: Dapr v1.0 is released, Azure Static Web Apps, more SolarWinds findings

This week, Dapr hit GA with v1.0. The next in a long line of technologies that promise to make distributed systems easier, weā€™ll see if this one sticks. While itā€™s hard for folks to pin down what exactly Dapr isā€”no, seriouslyā€”it uses pluggable components to remove the complexity of low-level plumbing involved with developing distributed applications.

Hereā€™s more detail from the new Dapr for .NET Developers e-book:

It provides a dynamic glue that binds your application with infrastructure capabilities from the Dapr runtime. For example, your application may require a state store. You could write custom code to target Redis Cache and inject it into your service at runtime. However, Dapr simplifies your experience by providing a distributed cache capability out-of-the-box. Your service invokes a Dapr building block that dynamically binds to Redis Cache component via a Dapr configuration. With this model, your service delegates the call to Dapr, which calls Redis on your behalf. Your service has no SDK, library, or direct reference to Redis. You code against the common Dapr state management API, not the Redis Cache API.

ā€“

In my talk last week on Azure Static Web Apps, it was nice to see Anthony Chu attend. Heā€™s the PM for Azure Functions and Azure Static Web Apps. We asked whatā€™s new with Azure Static Web Appsā€”he talked about a new tier, a CLI for a better local development experience, root domain support (right now it supports custom DNS with https://mysite.com but not https://www.mysite.com), an SLA, and more. Thereā€™s no firm dates on these things, but it looks like improvements are on the way before Microsoft takes it out of preview.

ā€“

We heard a little more about how the SolarWinds hack hit Microsoft:

Microsoft said its internal investigation had found the hackers studied parts of the source code instructions for its Azure cloud programs related to identity and security, its Exchange email programs, and Intune management for mobile devices and applications. Some of the code was downloaded, the company said, which would have allowed the hackers even more freedom to hunt for security vulnerabilities, create copies with new flaws, or examine the logic for ways to exploit customer installations ā€¦ Microsoft had said before that the hackers had accessed some source code, but had not said which parts, or that any had been copied.

Microsoft blogged their ā€œfinal update,ā€ so thatā€™s all weā€™ll hear about it. It looks like their defenses held up.

Dev Discussions: Cecil Phillip

I recently had a chance to catch up with Cecil Phillip, a Senior Cloud Advocate for Microsoft. Heā€™s a busy guy: you might have seen him co-hosting The .NET Docs Show or the ON.NET Show. Cecil also does a lot with with microservices and distributed systems. I wanted to pick his brain on topics like Dapr, YARP, and Service Fabric. I hope you enjoy it.

Cecil Phillip profile photo

Iā€™d love to hear about how you got in this field and ended up at Microsoft.

Iā€™ll try to give you a condensed version. Back in Antigua, we didnā€™t have computers in school at the time. One day, my dad brought home a Compaq Presario to upgrade from using a typewriter that he used for working on his reports. Initially, I wasnā€™t allowed to ā€œexperimentā€ with the machine, so Iā€™d explore it when he wasnā€™t around. I was so curious about what this machine could do, I wanted to know what every button didā€”and eventually, I got better at it than he was.

I went to college and got my CS degrees. I didnā€™t know I wanted to be a programmer. I didnā€™t know many examples of what CS folks did at the time. I got my first job working on ASP.NET Web Forms applications. After I got my green card, I spent a few years exploring different industries like HR, Finance, and Education. I taught some university courses in the evenings, and it was at that point I realized how much I loved teaching kids. Then one day, I saw a tweet about a new team at Microsoft, and I thought, ā€œWhy not?ā€ I didnā€™t think Iā€™d get the job, but Iā€™d give it a try.

When it comes to microservices, thereā€™s been a lot of talk about promoting the idea of ā€œloosely coupled monolithsā€ when the overhead of microservices might not be worth it. What are your thoughts?

Somewhere along the way, having your application get labeled as a monolith became a negative thing. In my opinion, weā€™ve learned a lot of interesting patterns that we can apply to both monoliths and microservices. For some solutions and teams, having a monolith is the right option. We can now pair that with the additional benefits of modern patterns to get some additional resiliency for a stable application.

Iā€™ve been reading and learning about YARP, a .NET reverse proxy. Why would I use this over something like nginx?

If youā€™re a .NET developer and want the ability to write custom rules or extensions for your reverse proxy/load balancer using your .NET expertise, then YARP is a great tool.

Azure Front Door seems reverse-proxy_ish_ā€”why should I choose YARP over this?

Azure Front Door is a great option if youā€™re running large-scale applications across multiple regions. Itā€™s a hosted service with load balancing features, so you get things like SSL management, layer-7 routing, health checks, URL rewriting, and so on. YARP, on the other hand, is middleware for ASP.NET Core that implements some of those same reverse proxy concerns, but youā€™re responsible for your infrastructure and have to write code to enable your features. YARP would be more akin to something like HAProxy or nginx.

A lot of enterprises, like mine, use nginx for an AKS ingress controller. Will YARP ever help with something like that?

Maybe. šŸ™‚

I know youā€™ve also been working with Dapr. I know it simplifies event management for microservices, but can you illustrate how it can help .NET developers and what pain points it solves?

The biggest selling point for Dapr is that it provides an abstraction over common needs for microservice developers. In the ecosystem today, there are tons of options to choose from to get a particular thing doneā€” but with that comes tool-specific SDKs, APIs, and configuration. Dapr allows you to choose the combination of tools you want without needing to have your code rely on tool-specific SDKs. That includes things like messaging, secrets, service discovery, observability, actors, and so on.

How does Dapr compare with something like Service Fabric? Is there overlap, and do you see Dapr someday replacing it?

I look at Dapr and Service Fabric as two completely different things. Dapr is an open-source, cross-platform CLI tool that provides building blocks for making microservice development easier. Service Fabric is a hosted Azure service that helps with packaging and deploying distributed applications. Dapr can run practically anywhereā€”on any cloud, on-premises, and Kubernetes. You can even run it on Service Fabric clusters since Service Fabric can run processes. It can run containers and even contains a programming model that applications can use as a hard dependency. Dapr itself is a process that would run beside your applicationā€™s various instances to provide some communication abstractions.

What is your one piece of programming advice?

I think itā€™s important to spent time reading code. We should actually read more code than we write. Thereā€™s so we can learn and be inspired by exploring the techniques used by the developers that have come before us.

You can connect with Cecil Phillip on Twitter.

šŸŒŽ Last week in the .NET world

šŸ”„ The Top 3

šŸ“¢ Announcements

šŸ“… Community and events

šŸŒŽ Web development

šŸ„… The .NET platform

ā›… The cloud

šŸ“” Languages

šŸ”§ Tools

šŸ“± Xamarin

šŸ— Design, testing, and best practices

šŸŽ¤ Podcasts

šŸŽ„ Videos

Top comments (0)