Posts Tagged ‘Design Patterns’

Design Patterns In Object-Oriented Software

November 3, 2009 6 comments

In Computer Science, a Design Pattern is a way of having a solution of a certain reoccurring problem. This solution is usually the best practice to solve that problem so there is no need to invent a new solution unless it appeared eventually that it is ultimately necessary to have a new best practice solution to that problem.

In other words, Design Patterns are one approach of the Software Reuse concept.

A Design Pattern is usually aimed at software components design in the software engineering. This concept became more popular after the book: Design Patterns: Elements of Reusable Object-Oriented Software. This book was written by 4 authors who are referred to as the Gang of Four or GoF. This book discusses 23 software design patterns that I think every developer must know so they can come up with good software design in a timely-efficient manner for their intended software system. According to the GoF book, these patters were classified by 3 categories: Creational Patterns, Structural Patterns, and Behavioral Patterns.


Creational Patterns

Creational Patterns provide the best way in which an object can be instantiated/created that can suit certain situations.

  1. Abstract Factory
  2. Builder
  3. Factory Method
  4. Prototype
  5. Singleton


Structural Patterns

Structural Patterns define the best ways to identify relationships between entities.

  1. Adapter
  2. Bridge
  3. Composite
  4. Decorator
  5. Facade
  6. Flyweight
  7. Proxy


Behavioral Patterns

Behavioral Patterns define the best ways to communicate between objects.

  1. Chain of Responsibility
  2. Command
  3. Interpreter
  4. Iterator
  5. Mediator
  6. Memento
  7. Observer
  8. State
  9. Strategy
  10. Template Method
  11. Visitor


That sums up 23 classic design patterns the I will try to pass through one by one to illustrate them in details and add that to my experience!

Please, read comment# 6

Your comments are highly appreciated!