Beer City Code 2024 - Configurable Cloud Native Applications with .NET Aspire
Mcbeev
136 views
43 slides
Aug 03, 2024
Slide 1 of 43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
About This Presentation
Building apps for the cloud has always been hard. Developers are typically pulled away from writing their business logic and what matters most to deal with the complexity of the cloud.
To help simplify cloud app complexity, Microsoft has introduced .NET Aspire. It includes a curated set of componen...
Building apps for the cloud has always been hard. Developers are typically pulled away from writing their business logic and what matters most to deal with the complexity of the cloud.
To help simplify cloud app complexity, Microsoft has introduced .NET Aspire. It includes a curated set of components that make sense to use in your C# projects.
.NET Aspire makes it easy to discover, acquire, and configure essential dependencies for cloud-native apps from the very beginning of your project.
Join me to walk through the set-up and usage of this new, powerful tool that can make any .NET developer more efficient in delivering cloud-native applications.
Size: 21.44 MB
Language: en
Added: Aug 03, 2024
Slides: 43 pages
Slide Content
Configurable Cloud-native Applications with .NET Aspire Brian McKeiver
Co-Owner, Solution Architect Microsoft MVP (Azure Cloud Native & AI) Kentico MVP (traditional CMS) Kontent.ai MVP (headless CMS) About Me @mcbeev linkedin.com/in/ brianmckeiver
We’re a digital agency focused on elevating brands, websites, and products. Our expertise and track record of award-winning work helps us accelerate growth for our clients. We make digital flow.
First Impression .NET Conf 2023 – November of last year
Don’t we already have this?
“ .NET Aspire is a must have for every developer, even if they are not working in the cloud.” - David Fowler Distinguished Engineer at Microsoft on .NET, Creator of NuGet, SignalR
Project Structure
Install / Workloads - CLI Pro Tip: dotnet new global.json -> edit file to specify .NET SDK version explicitly
Add/use Aspire project templates
Add Projects using .NET CLI
Application Model – App Host
App Host – Program.cs
Service Discoverability
Application Model for Service Discoverability
Components for
Component as a Reference
Two types of Components Cloud Agnostic Azure Specific PostgreSQL Entity Framework Core Azure Blob Storage PostgreSQL Azure Cosmos DB Entity Framework Core RabbitMQ Azure Cosmos DB Redis Distributed Caching Azure Key Vault Redis Output Caching Azure Service Bus Redis Azure Storage Queues SQL Server Entity Framework Core Azure AI Search SQL Server Azure Open AI and more… and more…
Enable Aspire in your Projects
Consuming in your Project ( program.cs )
Aspire Dashboard
Demo: .NET Aspire
Deployment The AppHost project can be executed to generate a manifest file describing the projects used by the app. .NET Aspire projects are designed to run in containerized environments (think Azure Container Apps ). Use: Azure Developer CLI ( azd )
What to do next Now that you know…
Add to Existing App
ConnectionStrings != ConnectionStrings In .NET Aspire a ConnectionString is not what you might think.
Demo: mcbeev.com
Not so fast Microsoft is good at marketing.
My Experience Bugs / Issues .NET 9 preview is very much not ready Lack of coverage Not all components are there Lack of configuration options //Can’t handle own section or 2 levels of config var conn = builder.AddConnectionString (" ConnectionString ");
Get Started with .NET Aspire Go with release 8.1 of .NET Aspire: Install .NET Aspire What’s new in .NET Aspire 8.1 Aspireify.net .NET Aspire project Tutorial Xperience by Kentico Interview w/ Scott Hunter on .NET Aspire Interview w/ Jeff Fritz on Deploying .NET Aspire Apps