Archive for March, 2014

As per the definition given by gang of four command pattern facilitates encapsulating a command request as an object – which means representing an action as an object

  1. This pattern helps us to persists a request/action in the form of an object
  2. The command pattern is a behavioral design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time
  3. It will allow you to have each of these actions as a separate object which you can save, retrieve and perform operations on the respective objects
  4. It’s basically designing our commands as objects

This pattern can be used everything from websites implementing complicated features like undo to implementing simple features like parsing command line arguments in console application.
I have used Job Life Cycle commands as an example to demonstrate command pattern. I hope that you would find it interesting and use it in your own applications.


In this video I have made an attempt to explain various aspects of factory pattern.

  1. Open the Object Browser from the View menu of Microsoft Visual Studio.
  2. Select .Net Framework 4 in Browse Menu
  3. Type ‘factory’ in the search text box and press search/enter option

You will get to see how extensively MS.Net Framework is using Factory framework.


The Factory Design Pattern is probably the most used design pattern in modern programming languages like Java and C#. It comes in different variants and implementations.

If you are trying to learn this pattern then you got to know about simple factory pattern, Factory Method and Abstract Factory.

Factory Design Pattern – Part 1

Factory Design Pattern – Part 2