Design patterns are an important facet of software engineering. I thought it might be a good idea to highlight them patterns on this page and explain about them in detail in my regular posts.
Design Patterns has been one of THE buzz words used in almost all the software shops for a while now and will remain so for quite some time. It is tantamount that you know at-least a few of them, lest you should live in oblivion. Knowing design patterns and learning how to implement them will definitely increase your marketability, which is a good thing; right ?
In software engineering, a design pattern is a general reusable high quality solution to a commonly occurring problem. A design pattern is not a finished product that can be transformed directly into code. A design pattern is a description or template for how to solve a problem that can be used in many different situations . They are not language specific and hence can be implemented using any language of choice.
What is a pattern?
In simple terms a Pattern is a generalized reoccurring solution to the situation/problem. Let me explain with a simple example.
What would one do when the hinge of your door make a squeaking noise?
You would pour a few drops of oil on the hinge to get rid of the noise.
What would one do when your key is hard to turn in your lock?
You would pour a few drops of oil in the lock to make the turning of the key more smoother.
What would one do when an nut got stuck to an iron bolt so hard that you are unable to unscrew the nut?
You would pour a few of drops oil on the screw and try to open them.
Problem: Metal pieces of a part/gadget get struck or get tight because of rust.
Pattern: We can use oil to loosen up the parts. This is a reoccurring solution to the problem mentioned above.
Hope I have made some sense with this example. Similarly all the design patterns are reoccurring solutions to problems that are encountered during Software design/development. The essence of defining and implementing these patterns is to avoid reinventing the wheel
The design patterns gain popularity after the book ” Design Patterns: Elements of Reusable Object-Oriented Software (ISBN 0-201-63361-2 published in 1995)” has been written by four authors; Erich Gamma, Ralph Johnson, Richard Helm and John Vlissides, famously called as the “Gang of four” and hence the name “GoF” or “gang of four” patterns. The “gang of four” have originally grouped design patterns into the categories Creational Patterns, Structural Patterns, and Behavioral Patterns. Another classification has also introduced the notion of architectural design pattern which may be applied at the architecture level of the software such as the Model-View-Controller pattern .
Note: This is an ongoing effort and please excuse me if you find this article rather incomplete
Dependency injection is a software design pattern that allows a choice of component to be made at run-time rather than compile time. This can be used, for example, as a simple way to load plugins dynamically or to choose mock objects in test environments vs. real objects in production environments. 
Inversion of Control
In software engineering, Inversion of Control (IoC) is an object-oriented programming practice where the object coupling is bound at run time by an assembler object and is typically not known at compile time using static analysis. 
Gang of Four Design Patterns:
These patterns create objects for you, instead of you having to instantiate objects directly.
This provides a simple decision making class which returns one of several possible subclasses of an abstract base class depending on data it is provided. The essence of the Factory Pattern is to “Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.” 
Provides an interface to create and return one of several families of related objects. In other words an Abstract Factory is a factory that would return one of several factories.
Separates the construction of a complex object from its representation, so that several different representations can be created depending on the needs of the program.
Prototype starts with an initialized and instantiated class and copies or clones it to make new instances rather than creating new instances.
Provides a class of which there can be no more than one instance, and provides a single global point of access to that instance. This is not definitely a very good pattern unless used properly. The reason being, the object generate from this class in essence a global object/variable and this is not a good thing in programming world.
These patterns will help you compose groups of objects into larger structures.
It is used to make a single class represent an entire subsystem
These patterns will help you define the communication between objects in your system and how the flow is controlled.
Chain of Responsibility
The command pattern is a design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method .
A template method defines the program skeleton of an algorithm. The algorithm itself is made abstract, and the subclasses override the abstract methods to provide concrete behavior.
This is a pattern where a publisher allows a subscriber to subscribe . The observer pattern (sometimes known as publish/subscribe pattern) is a design pattern used in computer programming to observe the state of an object in a program. It is related to the principle of implicit invocation. This pattern is mainly used to implement a distributed event handling system. In some programming languages, the issues addressed by this pattern are handled in the native event handling syntax. This is a very interesting feature in terms of real-time deployment of applications.
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Formally speaking, the strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
1. Design Pattern – Wikipedia
2. Code Project – Design Your Soccer Engine…
3. The Design Patterns Java Companion – Free online book by James W. Cooper
4. Factory method pattern – Wikipedia.
5. Command Pattern – Wikipedia
6. Dependency Injection – Wikipedia
7. Inversion of Control – Wikipedia