Minimal APIs – Pagination with Caching

By | 01/05/2024

When building REST APIs, pagination is a crucial feature for handling large datasets efficiently.In this post, we’ll explore two different approaches to implement pagination with caching in a C# Minimal API. Obviously, we will use the same project used in all Minimal APIs’ posts.Before to see the two implementations, we have to modify the method LoadDefaultValuesDB,… Read More »

Python – Virtualenv

By | 24/04/2024

In this post, we will see how to use Virtualenv in our Python projects.But first of all, what is Virtualenv?Virtualenv is a tool to create isolated Python environments and it is useful when we need to work with specific version of libraries/packages, without affecting other projects.We start installing Virtualenv with the command: IMPORTANT: currently, I… Read More »

SwiftUI – Property Wrappers

By | 10/04/2024

In this post, we will see how to use Property Wrappers in our SwiftUI projects.But first of all, what are Property Wrappers?“Property wrappers in SwiftUI are a powerful feature that enables us to add extra logic to the properties of our SwiftUI views or data models. They can manage storage, modify behavior, and add additional… Read More »

Python – Dockerizing a FastAPI application

By | 27/03/2024

In this post, we will see how to dockerizing the FastAPI application that we created in this previous post. First of all, we create a requirement.txt file where we will insert all libraries that we need to install to use the application: [REQUIREMENTS.TXT] Then, we create the dockerfile: [DOCKERFILE] Finally, to avoid unnecessarily copying everything… Read More »

Minimal APIs – In Memory Caching

By | 20/03/2024

In this post, we will see how to use In-Memory Caching to improve the performances of our Minimal APIs.But, why should we use caching?“Caching temporarily stores copies of data so future requests for that data can be served faster. The idea is to reduce the number of expensive calls, such as database queries, making the… Read More »

Design Patterns – Asynchronous Factory

By | 13/03/2024

In this post, we will see how to use the Asynchronous Factory Method pattern in our project.But first of all, what is Asynchronous Factory Method and why should we use it?“In many applications, especially those that involve database operations, initializing data asynchronously during startup is a common requirement. However, constructors in C# do not support… Read More »

C# – Concurrent collections

By | 06/03/2024

In this post, we will see some concurrent collections that we could use in our multi-threaded application where, managing shared data between threads, can introduce complexity and potential error such as race conditions or deadlocks. .NET addresses these cases with its concurrent collections, found in the System.Collections.Concurrent namespace. These collections are designed to be thread-safe… Read More »

Category: C#