Sunday, July 8, 2012


What Are Design Pattern?

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.

Where They Come From?

    Design patterns have their roots in the work of Christopher Alexander, a civil engineer who wrote about his experience in solving design issues as they related to buildings and towns. It occurred to Alexander that certain design constructs, when used time and time again, lead to the desired effect. He documented and published the wisdom and experience he gained so that others could benefit.
     About 15 years ago, software professionals began to incorporate Alexander's principles into the creation of early design pattern documentation as a guide to novice developers. This early work led others to also write about design patterns and culminated in the publication of Design Patterns: Elements of Reusable Object-Oriented Software in 1995 by Eric Gamma, Richard Helm, Ralph Johnson, and John Vlissides. This book is considered to be the "coming out" of design patterns to the software community at large and has been influential in the evolution of design patterns since.
    Design Patterns described 23 patterns that were based on the experience of the authors at that time. These patterns were selected because they represented solutions to common problems in software development. Many more patterns have been documented and cataloged since the publishing of Design Patterns. However, these 23 are probably the best known and certainly the most popular.
      Design Patterns are tried and tested best practices that one may implement himself in his application. It is a description or template for how to solve a problem that can be used in many different situations. Reusability and extensibility are the center of the design pattern motivation. 
Do I come across something like this before?    
  Many of the objects we utilize in a framework follow a design pattern. A common design pattern practice is to include the name of the pattern being implemented in the name of the object or objects. Most of us utilized objects in a framework that included words such as proxy, adapter, iterator, visitor, and command in the name of the object that means unknowingly we are utilizing some kind of a design pattern.
E.g. Adapter provides a solution to the scenario in which a client and server need to interact with one another, but cannot because their interfaces are incompatible. To implement an Adapter, you create a custom class that honors the interface provided by the server and defines the server operations in terms the client expects. This is a much better solution than altering the client to match the interface of the server.

What are benefits of design pattern?

1)    Design patterns allow us to exploit the experience of our predecessors using proven arrangements of objects.
2)    Speed up the development process by providing tested, proven development paradigms.
3)    Reusing design patterns helps to prevent subtle issues that can cause major problems, and it also improves code readability for coders and architects who are familiar with the patterns.
4)    Design patterns provide general solutions, documented in a format that doesn't require specifics tied to a particular problem.
5)    Design patterns make communication between designers more efficient. Software professionals can immediately picture the high-level design in their heads when they refer the name of the pattern used to solve a particular issue when discussing system design.
6)    a standard solution to a common programming problem enable large scale reuse of S/W
7)    They facilitate the development of highly cohesive modules with minimal coupling. They isolate the variability that may exist in the system requirements, making the overall system easier to understand and maintain.
8)    They enhance the documentation of software designs.


No comments:

Post a Comment