Architecture & Engineering
Practical software architecture, Clean Architecture, modular monoliths, and building maintainable systems that scale.
ASP.NET Core Web API Architecture: A Lightweight Starting Point
How much architecture does an ASP.NET Core Web API actually need? This is always the question when starting a new project and how to approach it can have a significant impact on how maintainable the project becomes as it evolves. →
Premature Optimization in Software Development: Examples, Risks, and Best Practices
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. You can end up solving problems that do not exist, or worse, introduce complexity into a system that was already working well. →
Building Robust State Machines: A Practical C# Example
State machines are great way to encapsulate complex logic where we have multiple transitions between one state to another with different conditions. It can be used to avoid complex if-elseif-else or switch-case statements in the way which is elegant and easy to read. In the end it is easier to track and debug state changes and new states and transitions can be added without major changes. →
Code Review Best Practices: Dos and Don'ts
Code reviews are a crucial part of writing a great software. They help to maintain code quality, catch bugs early, improve mentorship and collaboration withing the team. But if done poorly, they can be frustrating, time-consuming, and even demotivating, what could lead to the situation when they are not done at all, which is the worst case scenario. →
Git Merge vs Rebase: How to Keep a Clean Git Commit History
A well-maintained Git log is more than just a record of commits. It is a story of your project’s growth, collaboration, and problem-solving. But as projects scale and teams grow, Git logs can become cluttered, making it harder to trace changes, understand context, or troubleshoot issues. →
Clean Architecture in ASP.NET Core: Service & Repository Patterns
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. →
Composition vs Inheritance in C#: When to Choose Which
Inheritance is often misused or overused or even forced for several reasons, and they are mostly due to education, misunderstanding or habit. Many developers who studied OOP are introduced with inheritance in early stage and then it stays with them as a default way how to build relationships between objects. Escaping this matrix can be quite challenging, as lacking alternative perspectives often leads to the trap of believing that inheritance is the solution to everything. Here, we will try to find the reasoning behind this way of thinking. →
Database Migrations in .NET: Getting Started with FluentMigrator
In this post, we continue to explore ways to free your application from being tightly bound to the Entity Framework environment. The primary goal is to offer an alternative solution that is not only more flexible and robust but also gives you, as a developer, greater control over database manipulation with less abstraction and complexity. Here, we introduce a library for database migrations, which serves as a natural extension to tools like Dapper and SqlKata. →
SqlKata and Dapper: A Lightweight Entity Framework Alternative for .NET
Dapper is a lightweight, high-performance ORM for .NET. It is widely used because of its simplicity and speed. Dapper in its essence provides simple mapping to POCO and works with raw queries minimizing the overhead. On the other hand it lacks of flexibility in terms of query writing, because we need to write queries like static strings. One simple example is shown in the code snippet below. →
Book Reviews: Clean Code
Undoubtedly, one of the most popular books in software engineering, it teaches the fundamentals of software architecture, methods for organizing code, and is widely regarded as a must-read for any software developer. Written by Robert C. Martin, also known as “Uncle Bob,” the full title of the book is “Clean Code: A Handbook of Agile Software Craftsmanship”. →