The bridge design pattern can be used to decouple an abstraction from its implementation so that both can be changed independent of each other
Application pools isolate applications even if they are running on the same server for better reliability, security and improved performance
C# 7 focuses on better developer productivity and enhanced performance
Follow the recommended practices when working with asynchronous programming to achieve scalability and performance benefits
Learn what stubs, mocks, and shims are, their differences, and why they are needed and used to write efficient unit tests
Learn how to pass multiple complex objects as parameters to Web API controller methods.
The Law of Demeter principle reduces dependencies and helps build components that are loose coupled for code reuse, easier maintenance, and testability
This article is a continuation of the series of articles on Dapper. In the earlier article on Dapper, we have had a brief introduction on Dapper and to get started using in and perform CRUD operations. In this post, I’ll present a discussion on....
Extension methods can be used to inject new functionality to a type without needing to modify, derive, or recompile the original type
When working with asynchronous code in your applications, follow the recommended best practices to avoid potential pitfalls
Jagged arrays are a special type of arrays that can be used to store rows of data of varying lengths to improve performance when working with multi-dimensional arrays
The yield keyword performs custom and stateful iteration and returns each element of a collection one at a time sans the need of creating temporary collections
Take advantage of the NULL Object pattern to avoid writing too much boilerplate code in your application when checking for null values
Learn the potential pitfalls of using the repository pattern, including adding an extra layer of abstraction when it's not needed in your software designs
Unity Application Block, a lightweight dependency injection container, can build loosely coupled applications that are extensible and easier to test and maintain
The ConcurrentStack and ConcurrentQueue classes, lock-free and thread-safe implementations of the Stack and Queue classes, build thread safe collections in .Net
Learn the drawbacks of using the Singleton design pattern, one of the most widely used design patterns, and the alternatives to avoid its potential pitfalls
Microsoft .Net provides support for cloning objects -- an ability to create an exact copy of an object (also known as a clone). Cloning can be of two types: shallow copy and deep copy.
The Repository pattern implements separation of concerns by abstracting the data persistence logic in your applications
Proper synchronization constructs, structured and deterministic code flow will help you avoid Thread.Abort or Thread.Interrupt methods and terminate threads gracefully
The ServiceLocator design pattern builds loosely coupled modules that can be independently developed, tested, and deployed seamlessly
Connection pooling in ADO.Net lets you reuse database connections and improves data access performance
ASP.Net Core is an open-source and cross-platform, lean and modular framework for building high-performance web applications
Refrain from calling the GC.Collect method explicitly to reclaim the memory occupied by the objects in your application unless there is a specific reason do so
Cyclomatic complexity is a quantitative measure of the linearly independent paths in source code that can help you understand the complexity of your program and improve code coverage
Tuples can be used to store a finite sequence of homogeneous or heterogeneous data of fixed sizes and can be used to return multiple values from a method
SpinLock handles "busy wait" in scenarios where you have frequent contention but with reasonably short waiting times by avoiding context switches and improving performance
HTTPHandler is a low level request and response API in ASP.Net for injecting pre-processing logic to the pipeline based on file extensions and verbs
The Managed Extensibility Framework in .Net avoids fragile hard dependencies in your code and builds applications that are loosely coupled, lightweight, and extensible
The BlockingCollection class in .Net implements thread-safe collections efficiently
WebSockets implement fast, secure, bi-directional, full duplex communication between a client and a server to support real-time, low-latency messaging
Take advantage of Mutex for inter process synchronization and Semaphore to limit concurrent access to a shared resource in your application
Explore ways to handle concurrency conflicts to maintain data integrity and data consistency when working with Entity Framework
Content negotiation in Web API helps determine the best representation of a resource from among the various representations available
Quartz.Net is a .Net port of the popular Java job scheduling framework. It is an open source job scheduling system that can be used from smallest apps to large-scale enterprise systems.
Learn how to work with the Hashtable and Dictionary collection types and when to use one in lieu of the other in your applications
Constructors in C# initialize the members of the class to which they belong and design your classes with elegance
Explore ways to program the Windows Registry using C# to store and retrieve configuration information
Take advantage of the Decorator design pattern to add extensibility either dynamically or statically to your application
Operator overloading or ad-hoc polymorphism lets you work with user defined types much the same way you work with fundamental data types
Take advantage of PostSharp's compile-time weaving features to reduce code clutter and solidify your application’s code
In this post I would like to highlight a few performance optimization tips that would help you to prevent CPU outrages in your application.
Take advantage of the TPL Dataflow Library to implement producer / consumer pattern in .Net
Take advantage of WCF to build light-weight RESTful services and keep the resource URIs clean and lean
Learn the best practices to create and schedule tasks efficiently in .Net using Task.Run and Task.Factory.StartNew methods
MSMQ is a simple, convenient, reliable and persistent backing store for storing your messages
You can leverage the TransactionScope class present in the System.Transactions namespace for efficient transaction management when working in .Net.
Take advantage of nullable types to assign 'no values' or 'null values' to value types when there is no value available
Take advantage of Hangfire, an open source job scheduling framework, to schedule fire-and-forget, recurring tasks in Web applications sans the need of a Windows Service
Take advantage of ASP.Net Web Hooks to send HTTP POST notifications within the context of the ASP.Net runtime