Mediator Pattern Implemented In .NET/C#

9 minute read

The mediator pattern or the “domain whisperer” as I like to call it has been around for a long time and the main selling point of it is the reduction of coupling and enforcing clear separation of the domain logic from UI/Top layers. Let’s look at the Wikipedia definition. Usually a program is made up of a large number of classes. Logic and computation are distributed among these classes. However, as more classes are added to a program, especially during maintenance and/or refactoring, the problem of...

OAuth Client Credentials Flow With AzureAD

6 minute read

Navigating through the various authentication and authorization flows in AzureAD can sometimes be confusing. The Microsoft documentation on app types is a good place to start. Today we will be looking at the client credentials grant flow. The Microsoft documentation around the flow with regards to AzureAD can be found here. They have named the document Service to service calls using client credentials which is what the client credentials grant is used for. It is a prerequisite of this post that you ...

Integration Testing ASP.NET Core WebApi

4 minute read

If you’re a decent .NET developer and lucky enough to work in a good team then most of your work would be unit testable. But there is always a case to write some integration tests to make sure things work end to end. I was in such a situation recently. I had to write integration tests for a ASP.NET core 2.2 project which had external dependencies I had to mock during the test. The Microsoft documentation was very good but it doesn’t (at the time of writting this post) cover all scenarios when mocking is...

NimbleConfig - A Simple Config Injector For .Net

4 minute read

I recently started an open sourced project called NimbleConfig (hosted in GitHub). It is a simple, unambitious, convention-based configuration injector for .NET using IConfiguration (Microsoft.Extensions.Configuration) with full support for AspNetCore.

Speaking @LevelsConf 2018

1 minute read

I recently got a chance to speak at Levels Conference and it was my first time speaking in front of such a large audience. There were around 400 very keen junior developers there.

What Does Durable Azure Functions Solve?

4 minute read

Azure Functions are the way serverless compute is implemented in Azure. Amazon Web Services equivalent is called AWS Lambda. I won’t go into detail about what serverless is and what advantages it provides in this post. You can find my learnings from a project where I implemented my web api using Azure Functions here.

Using Azure Functions HttpTrigger As Web API

11 minute read

If you haven’t lived under a rock for the last 18 months you would know ‘Serverless’ is the new cool kid in town. Microsoft’s offer is called Azure Functions while Amazon calls it AWS Lambda.

Event Sourcing Examined Part 3 Of 3

7 minute read

In this 3 part series we will look at what event sourcing is and why enterprise software for many established industries use this pattern. Index Part One Introduction to Event Sourcing Why Use Event Sourcing? Some Common Pitfalls Part Two  Getting Familiar With Aggregates Event Sourcing Workflow Commands Domain Event Internal Event Handler Repository Storage & Snapshots Event Publisher Part Three (Thi...

Event Sourcing Examined Part 2 Of 3

9 minute read

In this 3 part series we will look at what event sourcing is and why enterprise software for many established industries use this pattern.