• Understanding the Lifecycle of a .NET Core Web API Request

      When you send a request to a .NET Core Web API, it goes thru series of steps before a response is returned. Understanding this lifecycle is important in order to built what we need and how to use some of the prebuild functionalities. In this post, we’ll break down the main steps of the .NET Core Web API request lifecycle.

    • Premature Optimization

      In software development, performance matters, but chasing it too early can lead you into dangerous territory. This is the pitfall of premature optimization, a term that has become a cautionary mantra among developers. As said by Donald Knuth, the phrase “premature optimization is the root of all evil” is not just a quip, it’s a hard-earned lesson from decades of building complex systems.

    • Design Patterns: Adapter

      The Adapter Pattern is a structural design pattern that allows objects with incompatible interfaces to work together. Rather than modifying existing code to fit a new system, the Adapter Pattern lets us wrap it with a new interface, acting as a bridge between mismatched parts of your application.

    • Web API Versioning and Testing

      In the previous post, we have paid attention on our project structure and organizing the code in multiple layers to achieve better readability and easier maintanence in the future. Now we can focus on long-term sustainability through versioning and testing.

    • Web API Architecture: Services and Repositories

      In the previous post, we added global error handling and logging using NLog. Now that we’ve made our API more resilient, it’s time to go forwards with cleaning up the architecture and separate concerns.

    • Web API Exception Handling and Logging

      In the previous post, we set up a basic .NET 9 Web API project. Now it’s time to take things further by adding global error handling and logging to make our API more robust.

    • Web API Project Setup and Migrations

      Welcome to the first post in the “.NET Core Web API – Step-by-Step Best Practices” series. In this series, we’ll walk through building a modern, clean, and maintainable Web API using .NET 9. Each post will focus on a specific aspect—from project setup and architecture to testing, migrations, and deployment.

    • Understanding State Machines with a Practical Example in C#

      State machines might sound like a complex topic, but at their core, they’re just a way to manage different states in a system and control how things transition from one state to another.

    • Design Patterns: Prototype

      In software development, there are scenarios where creating multiple objects with similar attributes and configurations is necessary. Instead of constructing each object from scratch, a more efficient approach is to duplicate an existing instance. This is precisely what the Prototype Design Pattern facilitates.

    • Code Review Best Practices

      Code reviews are a crucial part of writing great software. They help maintain code quality, catch bugs early, and improve collaboration. But if done poorly, they can be frustrating, time-consuming, and even demotivating. So, how do you make your code reviews effective and useful?