Posts

FastEndpoint vs Minimal APIs vs Controller

Here's a tabular comparison between FastEndpoints, Minimal APIs, and Controllers in the context of ASP.NET Core: Feature/Aspect FastEndpoints Minimal APIs Controllers Design Philosophy Focuses on performance and simplicity by providing a fast, endpoint-centric approach Prioritizes minimalism and simplicity, with an emphasis on lightweight, functional programming Based on the MVC pattern, providing a structured, feature-rich approach Performance Optimized for performance with minimal overhead High performance due to minimal abstractions Slightly more overhead due to MVC and routing abstractions Setup Complexity Requires additional setup and configuration but offers more granular control Minimal setup, quickly defined routes, and handlers Requires more setup and configuration with Controllers, Actions, and Routes Routing Explicit routing defined per endpoint, more control over routes Inline routing with lambda expressions, less verbose Attribute-base...

AutoMapper vs FastMapper

Here is a tabular comparison between AutoMapper and FastMapper: Feature/Aspect AutoMapper FastMapper Library Type Object-to-object mapping Object-to-object mapping Performance Slower, especially with large and complex mappings Faster, optimized for performance Setup Complexity Requires configuration for mapping profiles, but highly flexible Minimal setup, focuses on simplicity Custom Mapping Supports custom mapping rules and converters Supports basic custom mapping with less flexibility Inheritance Support Well-supported, can map between base and derived classes Limited inheritance support Null Handling Customizable null handling options Basic null handling Mapping Collections Supports mapping collections with built-in configuration Supports collections, faster due to lightweight processing Flattening and Projection Supports flattening complex objects and nested properties Limited support for flattening Assemblies and Dependencies He...

Workflow Orchestration Tools (Stateless vs Workflow Core vs Elsa vs Step Functions vs Hangfire)

Here's a tabular comparison of Stateless , Workflow Core , Elsa , Step Functions , and Hangfire in the context of building an orchestrator pipeline in C#: Feature/Aspect Stateless Workflow Core Elsa Step Functions Hangfire Primary Focus State machine library Workflow engine Workflow engine and orchestrator Serverless orchestration of workflows Background job processing Architecture In-memory state machine In-memory and persistent workflows In-memory and persistent workflows Cloud-native (AWS) serverless In-memory and persistent job storage Workflow Model State transitions Steps and transitions Steps, activities, triggers Tasks, states, and transitions Background jobs and recurring jobs Persistence No native persistence (requires custom implementation) Supports multiple persistence providers (e.g., EF Core, MongoDB) Supports multiple persistence providers (e.g., EF Core, MongoDB) Managed by AWS Supports multiple storage options (e.g., SQL ...

PostgreSQL - Working with a virtual/generated column

Image
PostgreSQL - Working with a virtual/generated column To create a table in PostgreSQL with a virtual/generated column derived from JSON data, you can use the jsonb data type along with a generated column. Here is an example: Sample Json: { "firstname":"John", "lastName":"Sri" } Create the table : Define the table with a jsonb column and a generated column that extracts a value from the JSON data. Insert data & Query data : Insert JSON data into the table and Query the table to see the generated column in action. Here is a step-by-step guide: Step 1: Create the Table In this example: id : A serial primary key column. data : A JSONB column to store the JSON data. first_name : A generated column that extracts the first_name from the JSON data. last_name : A generated column that extracts the last_name from the JSON data. Here’s how you might use this table: Step 2: Insert Data & Query Data This would result in the following output: In thi...

Kick start 2021 😃😃

Welcome 2021, Good bye 2020  When many are busy in cursing year 2020 & expecting some magic to come out one number changed on 31 Dec mid night. I feel, Year 2020 was the best teacher.   Year 2020 has taught many lesson in the course of just one year. So If you survived 2020, Remember: - 1. Your body, your health There is a old saying health is wealth , that's what we saw in pandemic. Many not survived the virus but fittest survived. Another law of evolution: Survival of the fittest , Remember, No matter what, always maintain your health. You never know when we land again in another pandemic.     2. Your company, your job   If your company kept you feeding whole year in 2020, you must agree to the fact that this one is best company & show the gratitude despite you may have many complaints with your company. Make sure  we give 100% to the our job & company.  3. Single source of income  My company is great & always takes care of ...

Work with Raspberry PI Zero W

Setup Raspberry PI  https://desertbot.io/blog/headless-pi-zero-ssh-access-over-usb-windows Setup Wifi with Raspberry PI Zero https://desertbot.io/blog/headless-pi-zero-w-wifi-setup-windows Setup Camera module  https://desertbot.io/blog/how-to-stream-the-picamera

Quotes

  Respect the the flat roads, Run over the hills - 3 Oct 2020 What are you afraid of? - Stopping - 4 Oct 2020 It's not about fatty body, it's about fatty mind. Train your mind, your body will follow - 6 Oct 2020 Turn off all the notifications, those are all distractions. - 16 Oct 2020 This time will pass, only your victory will remain - 24 Oct 2020   Pain, If it is letting you think, it's mental compulsion - 27 Oct 2020  Whatever we say, we forget. Whatever they say, we never forget.  - 14 Jan 2021 True power is to not to dominate the weak, True power is to inspire the strong for your will  - 26 Jan 2021 (Copied) You are what your choices are  - 9 Aug 2021