Microsoft’s .NET Aspire: The Spring Boot of .NET Development
Microsoft made its new cloud native development platform, .NET Aspire, generally available this week.
.NET Aspire is an opinionated stack for building observable, production-ready distributed applications with built-in resiliency, manageability, and observability.
Moreover, .NET Aspire provides a set of curated components and tooling, including a developer dashboard, and aims to make it easy to get started, build, and run cloud native applications, Gaurav Seth, Director of Product, Developer Platforms, told The New Stack.
At its Build developer conference this week, Microsoft made .NET Aspire generally available as a free, open source, and cloud-agnostic platform for building cloud native applications with proven tooling.
Developers can get started with .NET Aspire in Visual Studio 2022 17.10, the .NET CLI, or Visual Studio Code.
As Spring Boot Is to Java…
“Our goal is we start with a set of defaults and those defaults are extensible as we really want developers to focus on the logic that matters rather than the configurability so that’s why we call it opinionated,” Seth said.
An analogy Seth uses is that “we like to think that what Spring Boot is to Java, Aspire is to .NET,” he said. “We make it easy to get started with templates and curated components.”
Since its introduction in preview last November, .NET Aspire has seen significant improvements in security, support for new components and resources, and integrations with various platforms and tools.
“At the end of the day it is Microsoft’s key goal to drive as many developers to its Azure platform as possible,” Torsten Volk, an analyst at Enterprise Management Associates, told The New Stack. “And while there are cloud-agnostic components, Microsoft will use .NET Aspire to convince developers that they can be the most productive on Azure, over AWS or GCP.”
In addition, Microsoft is “Offering app templates that automatically set up pre-configured environments where developers can then add more capabilities by adding prepackaged components like Redis cache or a Postgresql database that are automatically configured to work with the new application,” Volk noted.
However, “All of this is a really good story that mainly will prevent organizations moving away from .NET, but I do not think that it will be enough to turn Python developers into .NET followers,” he surmised.
IaC Like Pulumi?
The platform brings together tools, templates, and NuGet packages to help build distributed applications in .NET more easily, whether building a new application, adding cloud native capabilities to an existing one, or deploying .NET apps to production in the cloud, said Glenn Condron, a Principal Program Manager at Microsoft.
“With .NET Aspire Microsoft is basically building in Infrastructure as Code, similar to Pulumi, without having to figure out how to compose their application from a myriad of cloud services available,” Volk said “The ability to reuse project components, configuration files and orchestration workflows across different development teams makes things even easier and ensures consistency within the organization.”
App Hosting
.NET Aspire introduces an App Host project that allows developers to use C# and familiar APIs to describe and configure the various application projects and hosted services that make up a distributed application.
The App Host project has two execution modes: run (for local development) and publish (for generating a manifest file to enhance deployment scenarios).
.NET Aspire ships with hosting extensions for integrating Node.js applications, common container and cloud-based services, and supports extending with custom hosting extensions.
“.NET Aspire does not change cloud native development per se but gives the .NET community many container deployment tools,” Larry Carvalho, an analyst at RobustCloud, told The New Stack. “GA products usually are not fully baked for developers, but if Microsoft invests resources to continue improving them, for example, moving beyond Azure Containers Apps, it will give .NET developers easier ways to build AI applications.”
Dashboard, Components, Deployment
The Aspire Dashboard provides a web-based interface to view details about the running application during development, including OpenTelemetry data (logs, traces, and metrics).
Meanwhile, the .NET Aspire Components are NuGet packages that integrate common client libraries for database, messaging, caching, and cloud services with resiliency and observability features enabled by default.
Moreover, .NET Aspire enables easy provisioning and connecting to cloud resources (Azure and AWS) during development. Deployment options include container-based deployment, Azure Container Apps using Azure Developer CLI or Visual Studio, and Kubernetes using Aspir8.
Aspirate (Aspir8) automates the deployment of a .NET Aspire AppHost to a Kubernetes Cluster.
“From the moment I first saw Aspire, I was extremely excited,” David Sekula, CTO at SimCube Ltd. also known as @Prom3theu5, told The New Stack back in November when he built the tool. “Not only does it loosen the coupling of the technology stack from your code base, but I immediately saw that it could also be leveraged outside of microservice development to give us back many hours in terms of repetition we’d usually have to perform on a project-by-project basis.”
Complementary Microsoft Technology
.NET Aspire is complementary with other Microsoft technologies such as Dapr and Orleans, Condron explained.
Dapr and .NET Aspire work together to improve the local development experience. By using Dapr with .NET Aspire, developers can focus on writing and implementing .NET-based distributed applications instead of spending extra time with local onboarding, he said.
Meanwhile, Orleans has in-built support for .NET Aspire. .NET Aspire’s application model lets you describe the services, databases, and other resources/infrastructure in your app and how they relate, Condron described. Orleans provides a straightforward way to build distributed applications that are elastically scalable and fault tolerant. And .NET Aspire is used to configure and orchestrate Orleans and its dependencies, such as, by providing Orleans with database cluster membership and storage, Microsoft said.
At Build, Microsoft released a preview of .NET 9, with enhancements in fundamentals, support for intelligent cloud native applications, and improvements to other workloads.
Also, Seth said Aspire .NET was honed and sharpened at Microsoft by major internal teams responsible for some of Microsoft’s most major services including Copilot.