Cache Implementations in C# .NET

Cache Implementations in C# .NET

One of the most commonly used patterns in software development is Caching. It's a simple, yet extremely effective concept. The idea is reuse of results. When performing a heavy operation, we will save the result in said cache

Class Instantiation Guidelines in Object Oriented Languages: When to choose Singleton, Static, Extension methods or Dependency Injection

Class Instantiation Guidelines in Object Oriented Languages: When to choose Singleton, Static, Extension methods or Dependency Injection

I'd like to tackle an old dilemma: Class instantiation. Which pattern do you use to create a class? Do you always use a new statement? Do we still need to use Singleton or Factory? Should we always use dependency injection? How about static classes, are they truly evil?

Performance Showdown of Producer/Consumer (Job Queues) Implementations in C# .NET

Performance Showdown of Producer/Consumer (Job Queues) Implementations in C# .NET

I recently wrote 3 blog posts on different Producer/Consumer (Job Queues) implementations. In this article, we will compare performance of all the approaches, including...

C# Job Queues (part 3) with TPL Dataflow and Failure Handling

C# Job Queues (part 3) with TPL Dataflow and Failure Handling

In this article, we'll see how to implement Job Queues with TPL Dataflow, including implementations of several of the said variations. We will dive into the Dataflow mindset along the way, figuring out this awesome library.

C# Job Queues (part 2) with Reactive Extensions and Channels

C# Job Queues (part 2) with Reactive Extensions and Channels

In the last article we talked about what are Job Queues in C#. We saw several great implementation using BlockingCollection and the thread-pool. In part 2, we'll see a couple of great ones including...

C# Job Queue Implementations in Depth - Part 1

C# Job Queue Implementations in Depth - Part 1

One of the most powerful tools in programming is the Job Queue. It's a simple concept that stands in the core of many software solutions. It's also a pretty interesting programming challenge, especially in a versatile language like C#.

When to use C# LINQ with Query Syntax over Method Syntax

When to use C# LINQ with Query Syntax over Method Syntax

In LINQ, there are 2 syntax flavors: query-syntax and method-syntax. While Method-Syntax is more popular, it isn't always better. There are several cases where query syntax is better, and this is what this article is all about. By better, I mean it makes more readable code.

C# Features: Innovations or Imitations? – Part 3

C# Features: Innovations or Imitations? – Part 3

Initially, C# was born as a strictly typed object-oriented language. It was influenced somewhat by Java and Delphi and was even called a Java imitation by...

C# Features: Innovations or Imitations? – Part 2

C# Features: Innovations or Imitations? – Part 2

In part 1 , we saw how C# has evolved from its inception in 2000 to the C# 3.0 release in 2008. C# did not introduce a revolutionary syntax or even revolutionary features. Instead, C# imitated most of its features from C++, Java, Scala, and several other languages. As is the Microsoft way, C# imitated many things but did it better than original. The most outstanding example of that is Generics.