Design Patterns & Practices
Design patterns & practices accelerate the design and development of custom applications and reduce project technical risks. Here you may find Design Patterns & Practices related articles and news.


  • Shivprasad Koirala

    Design Pattern Interview Question Part 1

    This article talks about factory, abstract factory, prototype pattern from interview point of view.
    Shivprasad Koirala Dec 15, 2017
  • Gaurav Gahlot

    Using Lazy<T, TMetadata> In Dependency Injection

    Lazy<T,TMetadata> is a type provided by MEF to hold indirect references to exports. Here, in addition to the exported object itself, you also get export metadata, or information that describe...
    Gaurav Gahlot Dec 11, 2017
  • Gaurav Gahlot

    Leveraging Delayed Instantiation with Lazy

    When we inject a dependency as Lazy<T>, we delay the construction of part of the object graph either for functional or performance reasons. Moreover, Lazy<T> will be automatically injec...
    Gaurav Gahlot Dec 11, 2017
  • Ozioma Ogbe

    Your Singleton Might Not Be "Single"

    Singleton has been a very popular design pattern as it is proven to have some advantages compared to the global variables
    Ozioma Ogbe Nov 21, 2017
  • Gul Md Ershad

    Dynamic Filter By Using Intercepting Filter Pattern

    This article explains Dynamic Filter using Intercepting Filter Pattern
    Gul Md Ershad Nov 19, 2017
  • Ashish Joshi

    Dependency Injection And Inversion Of Control C# - Par Two (Implementation)

    This demo is based on a traditional implementation approach: We have a Product class and it has a method which takes the discount and based on some business logic it applies the discount on the pro...
    Ashish Joshi Nov 17, 2017
  • Ashish Joshi

    Dependency Injection And Inversion Of Control C# - Part One (Concept)

    Dependency Injection is one of the SOLID" principles which helps to decouple the code by making sure that we depend on abstractions not on implementation of concrete classes.
    Ashish Joshi Oct 30, 2017
  • Ashish Joshi

    Factory Design Pattern In C#

    Factory Design Pattern is a type of Creational Design Pattern. Creational Design Pattern deals with creation of object such that they can be decoupled from their implementing system. Using this des...
    Ashish Joshi Oct 24, 2017
  • Ashish Joshi

    Strategy Design Pattern With Implmentation

    Here we have an Employee class which has 3 properties: Name, Address and EmployeeDepartment . We want to get the bonus of employee and the calculation is done based on the department the Employee b...
    Ashish Joshi Oct 23, 2017
  • Gaurav Gahlot

    Direct Dependencies And Enumeration

    In this post, we will be talking about the two most commonly used types of relationships, namely, direct dependency relationship and enumeration.
    Gaurav Gahlot Oct 09, 2017
  • Gaurav Gahlot

    Why "Service Locator" is an "Anti-Pattern" for Dependency Injection

    The Service Locator is used as a replacement for the new operator. The problem with service pattern is that it hides a class's dependencies and is a bonafide anti-pattern. In fact, it takes awa...
    Gaurav Gahlot Sep 30, 2017
  • Arvind Singh Baghel

    Software Design Principles DRY, KISS, YAGNI

    In this article, I am going to explore software design principles and their benefits and why design principle are useful for us and how to implement them in our daily programming. We will see DRY, ...
  • Gaurav Gahlot

    Dependency Injection Using Autofac

    In this video, I have talked about dependency injection using Autofac.
    Gaurav Gahlot Sep 25, 2017
  • Gaurav Gahlot

    Dependency Injection - Part 7 - Service Locator Pattern

    Service locator pattern is one of the most commonly used patterns. In general, this pattern is used along with other patterns like Adapter Pattern, Observer Pattern, Dependency Injection Principles...
    Gaurav Gahlot Sep 18, 2017
  • Gaurav Gahlot

    Dependency Injection - Part Six - Autofac's "AsImplementedInterfaces"

    While I was exploring Autofac, I found AsImplementedInterfaces quite interesting. Not only because it is useful, but also because if we are not careful with its use, we may end up with unexpected a...
    Gaurav Gahlot Sep 11, 2017
  • Gaurav Gahlot

    Dependency Injection - Part Five - Using A DI Container (Autofac)

    A DI container takes the responsibility of instantiating and providing the dependency instances, irrespective of the level of dependencies. As a result, it is a container that manages the scope of ...
    Gaurav Gahlot Aug 29, 2017
  • Gaurav Gahlot

    Dependency Injection - Part Four -Embracing Abstraction

    Dependency Injection (DI) is a technique that helps us achieve loose coupling between objects and their collaborators. In this post, we will use constructor based dependency injection, however, we...
    Gaurav Gahlot Aug 18, 2017
  • Gaurav Gahlot

    Dependency Injection - Part 3 - Implicit Vs Explicit Dependencies

    If a component or class depends upon other components to complete its operations, then these other components are dependencies for this class. Our class can have these dependencies as implicit or e...
    Gaurav Gahlot Aug 18, 2017
  • Gaurav Gahlot

    Dependency Injection - Part One -Tightly Coupled Application

    It is a best practice to use interfaces instead of concrete classes. These interfaces can then be mocked at the time of unit testing, which will prevent any call to the actual database. Also, it is...
    Gaurav Gahlot Aug 18, 2017
  • Gaurav Gahlot

    Dependency Injection - Part Two - Five Reasons To Write Loosely Coupled Code

    A loosely coupled application has good isolation among its classes, modules and assemblies. Therefore, if we make a change to one part of the application, we only need to update the relevant module...
    Gaurav Gahlot Aug 18, 2017
  • Gaurav Gahlot

    Analyzing A Tightly Coupled Application

    In this video, we looked at a tightly coupled application and tried to understand the problems associated with the same. You may also visit my article about the same at
    Gaurav Gahlot Aug 18, 2017
  • Gaurav Gahlot

    Null Object Design Pattern

    A null object is also known as a Stub, an Active Nothing or an Active Null. It helps our program logic to get rid of null checks where ever possible. We all know, that we can not call methods on a ...
    Gaurav Gahlot Jul 29, 2017
  • Jasminder Singh

    Proxy Design Pattern Using C#

    This article explains the Proxy Design Pattern. Proxy Design Pattern acts as a representation of an object and will basically be the access point to use the original object.
    Jasminder Singh Jun 27, 2017
  • Jasminder Singh

    Decorator Pattern Using C#

    This article is explaining the Decorator Pattern. This pattern is part of the Structural Design Patterns. The purpose of the Decorator Pattern is to extend the existing functionality of the objects...
    Jasminder Singh Jun 27, 2017
  • Akkiraju Ivaturi

    Singleton Vs Static Classes

    Why do you use a Singleton class if a Static class serves the purpose What is the difference between Singleton and Static classes and when do you use each one in your program?
    Akkiraju Ivaturi Jun 27, 2017
  • View More