Welcome to another edition of Reading Notes! This week, dive into the latest updates on Azure DevOps, Docker best practices, System.Text.Json enhancements in .NET 9, AI innovations from GitHub Universe, and more.
GitHub Spark (Devon Rifkin, Terkel Gjervig Nielsen, Cole Bemis, Alice Li) - Fascinating news from GitHub Universe. A new spin on the lowcode app but with code. Looking forward to trying it and see what I can build with it.
GitHub Copilot in Windows Terminal (Christopher Nguyen) - There it is, Copilot making his entrance into our beloved Terminal. It's only in version Canary for now, but I'm sure it will help many of us when no sure what command to use, or the equivalent bash/ PowerShell.
Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
5 Awesome C# Refactoring Tips (Milan Jovanović) - Refactoring is an important skill to have. Most code grow by patches and at some point it needs some help.
Hot Reload for C# Dev Kit (Mark Downie) - Wow! Things are evolving so fast, we pass from syntax highlighting from hot reload so fast!
344: Exploring CoreData and CloudKit (Merge Conflict) - Honestly it felt good hearing about those two genius struggling with data. But more than that to see them continue to look for different alternatives, and try new tools and patterns. Great episode, as usual.
Learning Blazor (David Pine) - This book is just perfect! It explains a bit of everything. It is packed with real examples and code variation (because there are so many ways to write something). There was even a full chapter un test with playwright, I didn't expect that and it was great!
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Programming
Web3 DevOps: The Series (Donovan Brown) - I'm just getting started with web3 there are so many tools.
How to Compare Two Json Objects Using C# (Code Maze) - Data is the core of most if not all applications and a common way to define the data is JSON. This post helps to understand how to compare a piece of information. Very useful.
Taking Comfortable Risks with Scott Galloway (A Bit of Optimism) - One thing he said that will stick with me I think, and that I need to now transform into my words: "There is nothing that will happen to you if you don't take some uncomfortable risks and talk to some people".
How to manage through a season of layoffs (Modern Mentor) - A season like those required more effort from everyone. It's hard and we all need to say nice and as much human as possible.
I use Azure Logic Apps in many of my solutions, I find them so conviennant to integrate different systemes. Recently one of them was failling and by lookink at the error message: The property value exceeds the maximum allowed size, I knew what was wrong. I was tying to save a JSON object into a Storage table but one property was too long. For this particular case I didn't need the value contain in the property so the plan was to delete it. At first, I thought it wasn't possible to edit a variable of type object in a Logic Apps, but it is!
In this post I will show how to use Compose action and setProperty to perform data operations in Azure Logic Apps.
The Context
First think to know is that the Compose action does not update the the current object but creates a new one. In this demo the JSON object use is quite short to simplyfy the demo.
{
"firstname":"Frank",
"lastname":"Boucher",
"alias":"fboucheros",
"bio":"With many years of experience in the IT industry, François (Frank) Boucher is a trusted Microsoft Azure professional whose expertise and bilingual service are relied upon in large Canadian markets (Ottawa and Montreal) as well as internationally. Among his many accolades, Francois has been awarded four times Microsoft Azure MVP status, named a Microsoft Azure Advisor, and Microsoft Azure P-Seller. Frank created the “Cloud 5 minutes” show. Where every second week, a new episode that answers a different technical question, is published both in French and English (cloud5mins.com). "
}
The Details
The Logic App recieve a JSON object from the request body. This is transfom as an Person object. To empty the bio property the action Compose will be used.
Inside the Compose action, use the context menu to find setProperty in the Expression section. The expression setProperty takes three parameters: the object, the property name, and the edited value. In this demo the goal was to empty the property therefore and empty string will be assign like this:
setProperty(variables('Person'),'bio','').
The edited object is accessible from the output of the Compose action and this what will be return in the Response action.
The Result
By adding a single action it's possible to edit JSON object in a Logic App without requiring to use inline code or external tools. A demo wouldn't be complite without a end-to-end run so here the result of a HTTP POST to the Logic App passing the Person JSON and the returned result.
Video version
If you prefer, I also have a video version of this post.
Good Monday, Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
ASP.NET Core CRUD with NoSQL: Part 2 (Matthew Groves) - In this second post of the series, we learn how to set an index and how to prepare our select to read our data.
An Introduction to JSON (Jack Wallen) - I thought it was a bit older than that. Nice post th o learn more about something we all use.
Good Monday, time to share my reading notes. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
You think you may have interesting content, share it!
Polymorphism in C# (Code Maze) - Oh nice, it's been a while since I read such a good post about this concept.
Codeless != Designless (Steve Fenton) - Of course, always design/ plan/ at east napkin drawing before starting putting the pieces together.
Using Minimal APIs in ASP.NET Core Razor Pages (Mike Brind) - Okay, okay, I think I could get used to this new minimal approach thing. I will need to code a little by myself first, but thanks to this post I have a good idea.
- Nice continuity of his first book Essentialism. I appreciated this reading. Many simple and easy ideas that we can start to apply. If interested in this topic Greg also has a podcast: What's Essential.
It's Monday (the cyber one), time to share my reading notes. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
You think you may have interesting content, share it!
Cloud
A Simpler Way to Azure (Rob Conery) - A very cool and interesting project. Even though I have never tried Heroku I think it's always good to push forward and make the user experience easier.
New recommendations in Azure Advisor (Kaitlyn Corazao) - This post provides a few more reasons to start looking at the advisor (but I'm sure you all already doing it.)
How to setup ASP.NET Core 2.1 on Linux in under 10 minutes (Daniel Crabtree) - Nice tutorial that goes further tthan simply the creation of the hello word application by showing some debugging configuration, and executing alternatives.
Announcing Azure App Service MySQL in-app (preview) (Sunitha Muthukrishna) - Wow! Many PHP developers must be waiting for this since so long. It's a very good news, and I'm sure many Wordpress users will be extremely happy too.
You know that image where you see people pulling a cart with square wheels, a man on the side wants to show them a circle wheel but the group reply they are too busy to care... Well, that was me with Azure Resource Manager (ARM). I knew it was good, but it looks too complicated, so I was waiting. Last weekend, I decided it was enough I needed to learn it! Right after few minutes, you cannot imagine my disappointment! It's so simple, so powerful and also so fast. This post explains how to deploy an ARM template, and how it works.
5 easy steps to deploy our first ARM template
To get started the easiest way possible I decided to use Visual Studio. For this sample let's create simple Windows Virtual Machine (VM). Only five steps are required to do it:
Step #1 - Create an Azure Resource Project
From Visual Studio create a new project of type Azure Resource Group. Be sure to have already installed on your machine the latest version of Azure SDK and Visual Studio updates.
Step #2 - Select the Arm template
This is where we select what we want in our template. Many options are available in VisualStudio and a lot more can be found on Github at: Azure Arm Git Template. In our case, let's select the sample Windows Virtual Machine, and click the Ok button.
Step #3 - Deploy the new template
Visual Studio will now generate multiple files, we will come back to it later, right now we will only deploy our solution. Right-click on the project et select Deploy.
Step #4 - Configure the deployment
Our first deployment is mostly ready, we just need to specify few details like the subscription and the resource group. Once you click Deploy, one last thing will be asked: the adminPassword.
Step #5 (the easiest one) - Enjoy
Voila! After few minutes, the virtual machine will be created, and we should be able to connect remotely to it.
Let's explain the magic
When the project was created, three folders were populated: Script, Template, and Tools. The last one is a bit obvious, it contains AzCopy, a tool to copy files. If you don't know AzCopy, you can learn more in a post I wrote recently.
Open the Deploy-AzureResourceGroup.ps1 contained in the Scripts folder. It's this script that will do all the hard lifting to deploy our rescourceGroup. If we look a bit closer, you will notice some parameters are declared, at the beginning of the file. Two of then should catch our attention.
TemplateFile is the path of our template (the one we selected previously), and the second TemplateParametersFile will contained all the parameters values to fill the blank of our template. This will be especially useful to deploy the same template in a different environment. In fact, this is a really big advantage. You can deploy the exact same schema to your development and production environment just by having two parameters.json file.
Let's have a peek at the template, in this case WindowsVirtualMachine.json. It's a 'json' file, so it's human-friendly, but it can be a bit scary at first. In the image just below, I collapse the collections to be able to emphases the visibility of the three prime elements: parameters, variables, and resources.
We already know parameters, so let's jump the variables. This section contains a list of key pair value like: imagePublisher, vmSize, virtualNetworkName, diagnosticsStorageAccountName, etc. Those can be fixed value or dynamics by using other variables or parameters. Here some example:
Last section but not least: the resources. This is where everything is put together to build the solution you will deploy. The resources are defined by specifying their type, name, and properties. You can assign any value from a static string, parameter value or a variable value.
Now that we know it works, why should we use it
Explain all the advantages to use ARM template could be a post by itself, and go further of the scope of that post. However, here few reasons:
A template file is light and easy to keep in a repository.
It's very simple to have the exact same template deployed in multiple environments.
ARM templates are really fast to deploy.
Easy to edit/ customize/ expand.
Easy to delete.
In Video Please
If you prefer, I also have a video version of this post.
Microsoft Azure Web Site Cheat Sheet - Wow! I really think that ALL the information about Azure website is on this page, and it's super clear. Amazing job.
Cloud, cloud, everywhere - This post makes me realize how many different cloud solution I'm using.
Programming
Three steps to use jQuery UI in ASP.NET MVC 5 (Dhananjay Kumar) - Direct to the point. This is a good tutorial to not losing time and gets our solution correctly configured the first time.
Inception-Style Nested Data Formats (Scott Hanselman) - What seem to be a good solution at one point could put you in a big problem tomorrow. This post explains one possible cause.
VM Image (Christine Avanessians) - Wonderful, so many new functionalities! I'm really looking forward to know more and try it.
VM Agent and Extensions – Part 1 (Kundana Palagiri) - This post introduced the currently available extensions with a quick example. VMExtension looks a very promising feature with a lot of potential.