11 июля 2023 г.
Просмотров: 478
Exploring Key Features, Use Cases, and Performance of Two Popular Real-time Communication Protocols
Introduction
Real-time communication plays a crucial role in today’s connected world, powering applications such as IoT devices, web-based chat, gaming, and industrial automation. Choosing the right protocol to facilitate this communication is essential to ensure the smooth functioning and optimal performance of an application. MQTT and SignalR are two popular messaging protocols that serve different purposes and excel in...
далее...
9 июля 2023 г.
Просмотров: 313
When you have multiple applications and they need to communicate with each other to exchange data you might want to use a protocol that makes something like that happen. In C#, the HTTPClient class provides a powerful and flexible way to make HTTP requests and handle responses. Whether you’re building a web application that needs to interact with APIs or simply need to retrieve data from a server, HTTPClient in...
далее...
29 июня 2023 г.
Просмотров: 352
Attributes and decorators, which allow you to attach metadata to classes, properties, and methods.
Attributes
Attributes in C# allow you to attach metadata to your classes, methods, and other code elements. This metadata can then be used at runtime to modify the behavior of your code. Attributes are applied to code elements using square brackets, and they can contain additional information such as parameters.
For example, you can use the [Serializable] attribute to...
далее...
27 июня 2023 г.
Просмотров: 186
Introduction
Performance optimization is a key concern in software development, regardless of the programming language or platform you’re using. It’s all about making your software run faster or with less memory consumption, leading to better user experience and more efficient resource usage.
For .NET developers, understanding and implementing performance optimization strategies can be the difference between an application that just ‘works’ and an application that works exceptionally well, even under heavy load.
//...
далее...
13 июня 2023 г.
Просмотров: 262
One of the things that we may struggle with as developers when working on a green field project is our stack. Choosing the right tech to solve a problem can be a harrowing experience. Databases, in particular, can be a bit tough if we’re unsure how our data is going to be used.
This article aims to assist you in choosing the right type of database. We explore the differences between...
далее...
8 июня 2023 г.
Просмотров: 461
This is my first article about gRPC on ASP.NET 6. In this article, I will give a short introduction to what gRPC is and the different types of communication in gRPC. In the end, I will share a simple console chat application and briefly explain how it works. The link to the codebase can be found here in my Github Repo.
What is gRPC?
In gRPC, a client application can directly call...
далее...
8 июня 2023 г.
Просмотров: 263
At the end of this article you will understand what “^(?=.*[a-z])(?=.*[A-Z])(?=.*).*” means
Introduction to C# Regex: why it’s a powerful tool for text manipulation
Before diving into the magical world of regular expressions, let’s get an idea of why using C# Regex is important and how it can boost your productivity as a developer.
In this section, we’ll walk through the basics of regular expressions, their syntax, and key elements to help you...
далее...
7 июня 2023 г.
Просмотров: 261
I’d like to take you on a journey back in time, precisely 15 years ago, when my journey into software development began. As a younger me, armed with nothing but curiosity, I was introduced to the html and css.
In the beginning, it was all about figuring out the basics. HTML websites were my training ground. Then came PHP, followed by JavaScript. Every new language was like a puzzle. This wasn’t...
далее...
6 июня 2023 г.
Просмотров: 384
Mastering the art of scalable and resilient systems with essential microservices design patterns
Unleash the power of microservices
Are you striving to build efficient, scalable, and resilient software systems? As a software developer or senior developer, you must have come across the term “microservices architecture.” This revolutionary approach to software development has been adopted by many successful tech giants, such as Netflix, Amazon, and Spotify. But, what exactly are microservices, and why...
далее...
5 июня 2023 г.
Просмотров: 346
In this section, we’ll explore the world of unit testing in C# and .NET, learn what unit testing is, why it’s important, and the landscape of testing frameworks and tools available to developers.
What is Unit Testing?
Unit testing is the process of verifying the correctness of individual units of code, typically methods or functions, in isolation from the rest of the system. This ensures that each unit performs as expected and...
далее...
2 июня 2023 г.
Просмотров: 220
Cyclomatic complexity is a code metric (integer value 1 or more) used to measure how complex a function/method is.
It does not take into account lines of code but instead considers complexity to be the distinct paths through a function.
Microsoft defines cyclomatic complexity as measuring the amount of decision logic in a source code function.
Cyclomatic complexity: if if if if if else …
Because cyclomatic complexity concerns itself with decision branches through...
далее...
31 мая 2023 г.
Просмотров: 450
LINQ (Language Integrated Query) is a powerful querying tool in .NET that allows you to perform complex queries directly in C#.
The System.Linq.Expressions namespace is a part of LINQ that provides classes, interfaces, enumerations and structures to work with lambda expressions and expression trees.
Lambda expressions are a way to create anonymous methods inline where they’re used, usually with the purpose of manipulating data. For example, let’s say you have a list...
далее...
31 мая 2023 г.
Просмотров: 251
Understanding uow to use And and Or operators with Expression Trees
As a C# developer, you may have come across scenarios where you need to build complex logical expressions dynamically based on user input or other dynamic factors. In such cases, building expressions statically can become tedious and error-prone.
In this article, we’ll explore how to use expression trees to build logical expressions in C#. We’ll start with a simple example that...
далее...
29 мая 2023 г.
Просмотров: 585
Maximizing Performance in Asynchronous Programming
Task and Task<TResult>
The Task and Task<TResult> types were introduced in .NET 4.0 as part of the Task Parallel Library (TPL) in 2010, which provided a new model for writing multithreaded and asynchronous code.
For demonstration purposes, let’s build an example:
using System;
using System.Diagnostics;
using System.Threading.Tasks;
public class Program
{
public static void Main()
{
long limit = 2;
var stopwatch = new Stopwatch();
Console.WriteLine("Press 'C' key to exit the loop...");
while...
далее...
27 мая 2023 г.
Просмотров: 339
In today’s fast-paced world of software development, it is crucial to be familiar with design patterns that can help you create robust, efficient, and maintainable code. One of the most widely used programming frameworks for enterprise applications is the .NET framework. In this article, we will explore the most commonly used design patterns in .NET development and how they can be applied to solve common problems encountered in software development.
What...
далее...
14 мая 2023 г.
Просмотров: 1143
In this article, I’ll show you what the basic steps are for converting a SQL query into LINQ. You’ll learn the basic steps needed while we convert an example query.
In this article, it's assumed that you have a basic understanding of SQL, and know how to write C# code.
Introduction
Structured Query Language (SQL) is a powerful language for working with relational databases. It is widely used to retrieve and manipulate data...
далее...
14 мая 2023 г.
Просмотров: 341
What is Kafka?
Kafka is a distributed streaming platform developed by the Apache Software Foundation. It is designed to handle high-volume, real-time data streams and is commonly used for building data pipelines, stream processing applications, and real-time analytics.
At its core, Kafka is a publish-subscribe messaging system that allows producers to write data to topics and consumers to read data from those topics in real-time. Kafka is highly scalable and fault-tolerant, with...
далее...
13 мая 2023 г.
Просмотров: 468
Introduction to Async and Await in C#
Asynchronous programming has come a long way in C#. Prior to the introduction of async and await, developers had to rely on callbacks, events and other techniques like the BeginXXX/EndXXX pattern or BackgroundWorker.
These methods often led to complex and difficult-to-maintain code. With the release of C# 5.0, async and await keywords were introduced, simplifying asynchronous programming and making it more accessible to developers.
The Importance...
далее...
12 мая 2023 г.
Просмотров: 322
Language Integrated Query (LINQ) is a powerful feature in C# .NET that allows developers to query various data sources using a consistent syntax. In this article, we’ll explore some advanced LINQ techniques to help you level up your skills and write more efficient code.
LINQ Extension Methods
LINQ comes with many built-in extension methods, but you can also create your own custom methods to extend LINQ’s capabilities.
Custom Extension Methods
By creating your own...
далее...
12 мая 2023 г.
Просмотров: 496
Developing a robust, scalable, and efficient system can be daunting. However, understanding the key concepts and components can make the process more manageable. In this blog post, we’ll explore essential system design components such as DNS, load balancing, API Gateway, and more, along with a concise cheat sheet that can help developers design systems of varying complexity.
System Design Blueprint / Cheatsheet
A comprehensive visual guide that provides developers with a quick...
далее...