Which one is better? Fluent Validation and Data Annotations

Table of Contents What is smooth verification Introduction benefit Common scenarios What is data annotation A brief introduction to data annotation Advantages of data annotation Advanced usage of data annotations Use cases for data annotation Compare the difference Code Organization Complexity Handling Customizability Complexity Comparison: Ease of Use vs. Flexibility Smooth verification Data annotation Performance […]

Fluent Python (Second Edition) Companion Reading 1.1 Python Data Model[2/3]

How to use magic methods Regarding magic methods, the first thing to understand is that they are called by the Python interpreter and should not be called manually. For example, instead of using my_object.__len__(), use len(my_object) to have Python call __len__ automatically. However, the interpreter provides some shortcuts for certain built-in types – such as […]

Fluent Python (Second Edition) Companion Reading 1.1 Python Data Model[1/3]

Since Python has a long history (it was born in 1991), there have been version iterations and optimizations. Therefore, the Python language is a highly self-consistent computer language with a self-contained grammar. For people who have been learning and using Python, they will form a programming habit, commonly known as Pythonic – Python style. However, […]

QFluentWidgets: Fluent Design component library based on C++ Qt

Introduction QFluentWidgets is a Qt-based Fluent Designer component library with more than 150 built-in out-of-the-box Fluent Designer components, supporting seamless switching between light and dark themes and custom theme colors. Paired with the WYSIWYG Fluent Designer software, you can quickly build a modern software interface by just dragging and dropping without writing a line of […]

CQRS validation pipeline based on MediatR and FluentValidation

CQRS validation pipeline based on MediatR and FluentValidation CQRS Validation Pipeline with MediatR and FluentValidation – Code Maze (code-maze.com) Sample code address: https://github.com/CodeMazeBlog/cqrs-validation-mediatr-fluentvalidation/ Let’s get straight to it. 1. What is CQRS? CQRS, or Command Query Responsibility Separation, has become increasingly popular in recent years. The idea behind CQRS is to split your application’s logical […]

k8s fluentbit collects the logs of all container standard outputs

k8s-fluentbit collects the logs of the standard output of all containers 1. fluentbit collects the logs of the standard output of all containers Write fluentbit log collection yaml configuration file — # fluentbit configuration file apiVersion: v1 kind: ConfigMap metadata: name: fluent-bit-config namespace: efk labels: k8s-app: fluent-bit data: # Configuration files: server, input, filters and […]

Build loosely coupled ASP.NET Core API apps using Autofac, MediatR and FluentValidator

Use MediatR and FluentValidator 1. Create sample folder Sample First, create the sample folder Sample. 2. Create presentation layer project Web In the sample folder Sample, use standard dotnet commands to create a sample project based on the minimal WebAPI project under .NET 6. dotnet new webapi -n Web New projects will contain a WeatherForecastController […]