CI Pipeline

Azure Pipelines and test code coverage for Dotnet core projects

Background I am proud to say that I work in a team where we follow Test Driven Development and pair programming. This has been a life changing experience for me as for several years, I had been writing code first and only writing tests after I thought it was doing what it meant to be doing which often lead to tests that only tested the bare minimum or lead to poorly thought out code that was badly coupled. However, since the last quarter of 2020, I have been practicing TDD with my pair programming partner on every new project except for when it came to working on legacy code where it would take us, much longer to refactor and make the code testable in the first place. ...

June 29, 2021 · 7 min · 1432 words
EF Core

Entity Framework Core: Configure Database Connection using Azure Service Token Provider

Update - READ THIS FIRST There is now support to connect to any Azure SQL database, Azure SQL Managed Instance and Synapse SQL in Azure Synapse Analytics from your .NET Core app using just the connection string. To learn more about this read the following pages: Use Azure Active Directory Authentication with your Azure DB Using Azure Active Directory auth with SqlClient This will completely eliminate the need to write any code to obtain a service connection in your application. I found this out when I shared this post earlier on Twitter. ...

June 26, 2021 · 11 min · 2319 words
Reverse Proxy

Proxy vs Reverse Proxy - What are they?

I was recently helping my friend with some preparation for a system design interview and as we discussed solutions, the terms Proxy server and reverse proxy came up in our discussions. I really struggled to give a simple explanation of the terms during our discussion. I just knew what one did. I did not even know that load balancers were generally reverse proxies. This is where knowledge of a natural language could be helpful. So I thought I would try and compile a simple description of both here and go look at the definition of Proxy from the dictionary. ...

June 6, 2021 · 3 min · 519 words
Git

Git, Case Sensitivity and Github actions

Git is easy I have used git for quite a long time. I have also been coding in .NET for fairly some time now. I have created plenty of dotnet project repositories in Github and integrated some basic CI features to it using Github actions. It has all gone fairly well, until it didn’t, today. The documentation is pretty solid and I know a lot of it on top of my head. But today, I ran into something that got me totally by surprise and wasted a lot of my time on it. ...

May 15, 2021 · 5 min · 961 words
Structured Design

Cohesion and Coupling - two important concepts to understand when building good software

When building applications, it is fundamental to think about design first. This process of designing first helps visualize some of the key areas that you are going to tackle. How are the different elements or components going to interact with one another? What are the various components going to be? What are the responsibilities of each of these components? Software Engineering is a pretty young field, compared to other engineering domains. And over the last 60 years or so, has made tremendous amount of progress. This has led to the rise of several different blueprints for solving common problems, often called design patterns or architectural patterns. These are great tools to use when developing your solution, provided you understand what they solve and when best to use them. ...

May 9, 2021 · 6 min · 1184 words
Problem Details

Using ProblemDetails in .NET Core 3.1 with C#

What is Problem Details? When you are an API developer, you often need to convey errors to the client or consumer of the API. It is not always a happy path when it comes to using an API. Things do go wrong sometimes. Networks fail. Databases encounter issues. Your application could encounter an unhandled exception due to another service downstream that failed to respond correctly! When developing distributed applications, one must design for failure, as there are many points of failure. And when there are failures that we cannot immediately rectify, we must be able to let our consumers know what to do. ...

May 8, 2021 · 15 min · 2992 words
Dotnet logo

.NET (dotnet) Framework and Core and things

ASP.NET Core I have used ASP.NET core a lot. But I wonder how I would describe it to someone who has never used it before. So I decided to give it a shot at describing in simple words what it really is. What is it? ASP.NET Core is a cross-platform, open-source framework for building modern internet connected apps that can be deployed on premises or in the cloud. Cross-platform - an asp.net core app can run on linux, macos and windows, so long as you have installed the dotnet runtime in there Open-source - yes, microsoft did make it all open source. You can read the code on https://github.com/dotnet/aspnetcore ...

May 7, 2021 · 6 min · 1224 words
Event Storming

Event Storming

Featured image from 3dots Event storming by Alberto Brandolini is a great way to gather information and understanding about a domain. What is it? It is a workshop based method to find out what is happening in the domain of a software program. It is extremely lightweight and intentionally requires no support by a computer. The business process is stormed out as a series of domain events which are denoted as orange stickies and other elements on stickies of different colours on a wall. The idea is to bring domain experts and software experts into a room and discuss how the business works in terms of events that are important to the business, thereby helping the both the software team and the domain team to learn from each other. ...

April 25, 2021 · 8 min · 1595 words
Domain Driven Design

Why Domain Driven Design

Feature Image by Overview of Domain-Driven Design. Source The DDD Community 2019, pp 6. This is my understanding of the importance of DDD having read books and articles and attended courses on it and also having how projects can get really complex over time and unmaintainable with little knowledge of the domain from personal experience. How does software development look like? Software development is a very unique profession. You almost always create software to solve a real world problem in a very specific domain. More often than not, these problems mightnot have anything to do with software engineering until a solution is implemented. ...

April 8, 2021 · 12 min · 2403 words · eakangk
Versioning

Web API Versioning

Back-end developers quite often find themselves thinking about making breaking changes to their API. A change that could break the client application consuming the API. We quite often forget how easy it is to cause havoc for our clients by breaking the contract we agreed between front-end and back-end. All sorts of unintentional consequences could arise from this. We recently had a similar conversation at my workplace about how we wanted to deal with the release of a feature we had been working on in the last sprint. ...

March 12, 2021 · 1 min · 206 words · eakangk