Beer City Code 2024 - Configurable Cloud Native Applications with .NET Aspire

Mcbeev 136 views 43 slides Aug 03, 2024
Slide 1
Slide 1 of 43
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
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...


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

[email protected] @mcbeev https://www.mcbeev.com Thanks! Slides: mcbeev.com/ beercitycode