In this post, I’ll walk you through the journey of how https://aspire.dev came to be—from the initial spark of rebranding to the technical challenges of deploying it with our own tools. It’s a story of design iterations, platform decisions, and the kind of dogfooding that makes you question your life choices… Spoiler: we made it work, and learned a lot along the way.
🕓 A bit of history
The first commit of dotnet/docs-aspire was November 10, 2023, but we were building out content for this well before then. Spawning itself into existence from an evolving extensions ecosystem (code named “R9”), Astra was the original name, before later becoming Aspire! The name still isn’t something I like, it’s too ambiguous, but it’s what we have now.
Exploring .NET streaming API scenarios
If you’re a .NET developer, chances are you’re already familiar with the IAsyncEnumerable<T> interface. This interface was introduced in .NET Core 3.0 and is used to asynchronously iterate over a collection of data. This is a great way to stream data from a server to a client. In this post, you’ll learn how to:
❗ IMPORTANT
This post was generated using
ChatGPT. I prompted the AI with a few leading questions and formatted the responses as the body text of this post. For more information, see the
ChatGPT.
A conversation with ChatGPT about .NET Dependency Injection
What is dependency injection and why is it important?
David Pine
Dependency injection is a software design pattern that allows a programmer to remove hard-coded dependencies and make them configurable. This is important because it makes code more modular and easier to maintain, test, and reuse. Additionally, it makes it possible for different parts of a program to be supplied with the specific dependencies they need, rather than having to rely on a global, static dependency. This can make it easier to manage complex systems and can help to improve the flexibility and scalability of a program.
GitHub Actions: Core .NET SDK
SDKs are great, but why do we need one for GitHub Actions? The short answer is, you don’t! You can write a GitHub Action in .NET without using one. I’ve written about this already, if you’re interested see the Tutorial: Create a GitHub Action with .NET. There are a few ways in which you can write a GitHub Action. You can do so using JavaScript, Docker, or as a composite action. One of the easiest ways was to use JavaScript, as the GitHub team maintains an open-source SDK (or actions/toolkit) written in TypeScript. Their toolkit is comprised of a set of packages to make creating actions easier.
In June 2021, I set out on a journey to write a book in the middle of a global pandemic. I had no idea what I was doing (all things considered, I still don’t know what I’m doing). But I do know that I truly enjoy helping others. I hope you enjoy the book as much as I enjoyed writing it.
Amazon Preview
Foreword by Steve Sanderson
Web development has been a dominating feature of the software industry for over 20 years and is likely to remain so for many years to come. Industry giants continue to invest heavily in expanding web technology’s power and flexibility, enabling an increasing range of advanced browser-based software. While native mobile apps and augmented reality / virtual reality apps find their place for consumer software, the web is overwhelmingly the default UI for business apps. If you could bet on only one application platform, you should bet on the web.
Blazorators
Blazorators is a C# source generator that creates fully functioning Blazor JavaScript interop code, targeting either the IJSInProcessRuntime or IJSRuntime types. All of this code relies on the output of one of my side projects named blazorators. While writing my O’Reilly “Learning Blazor: Build Single-Page Apps with WebAssembly and C#” book, I discovered an impactful way to use both TypeScript type declarations from common JavaScript APIs and C# source generators to generate the JavaScript interop code. This is covered in chapter seven, so I don’t want to spoil it too much, but rather entice you to want to read the book. I’ve been using this approach in my Blazor apps for a while now and I’m excited to share it with you. Let’s get started!
Intro
With more than 40 million active users, GitHub is by far the largest source code hosting platform in the world. It’s an open source developers dream, and ecosystem and developer community unlike any other. And with all these users and such profound openness, there’s bound to be frustration from time to time. In this post we will explore an Azure Function written with ASP.NET Core 3.0 and C# 8.0. It has been designed to handle a GitHub webhook for issues and pull requests. In other words, we are able to target a specific GitHub repository and listen for new issues or pull requests - as they occur, our Azure Function is called.
Background
Most of us are all “slackers”, meaning we truly do spend a significant amount of time using Slack.
Slack is a collaboration hub for work, no matter what work you do. It’s a place where conversations happen, decisions are made, and information is always at your fingertips.
<a href="https://www.slack.com" target='_blank'><a href="https://www.slack.com">www.slack.com</a></a>
It’s wildly popular in the Developer Community! In fact, almost to a fault…people are constantly sharing their “slack fatigue”. I am personally a part of roughly twenty slack workspaces. One of the really cool features of slack is the ability to integrate with the tool itself through the Slack API. Imagine a plugin playground where you’re free to extend the capabilities of the slack ecosystem. Look to the
<a href="https://api.slack.com/" target='_blank'>Slack API</a>
.
The Story Behind The Game
I have three sons. Lyric who is six and a half, Londyn who is four and half, and Lennyx who is two and half. As you might imagine, they seldom agree on things. For example when it’s family move night, “which movie we’ll watch?”, or “who gets to go first?” when playing a game. These important life decisions are often decided by playing the color guessing game. My wife or I will choose a color at random and have the boys guess a color until someone guesses the correct color. Whoever guesses correctly is the winner and they get to choose the movie or go first, etc. You get the point!
I’m proud to share that this post is part of the C# Advent Calendar and it’s my second year contributing to it! I encourage you to check out all the others
<a href="https://crosscuttingconcerns.com/The-Second-Annual-C-Advent" target='_blank'>here</a>
.
Developers Are Lazy
In the world of web development it is hard to escape certain tools that we are forced to rely on. As developers we’re innately lazy and it is safe to say that perhaps we don’t really care enough to look into other tooling options. Let’s face it… you’re lazy, and I’m lazy and that is all there is to it. .NET Core offers
<a href="https://aka.ms/global-tools" target='_blank'>global tooling</a>
, much like NPM you can use these tools for various build automation tasks. It’s worth exploring .NET Core Global Tooling to see how it might enable us to be even more lazy!