Time Stays Long Enough For Those Who Will Use It.
Alok kumar 4/8/2009 1-25
What Are Design Patterns and Do I Need Them?
http://www.developer.com/design/article.php/1474561 ByJames Maioriello
Software professionals may be familiar with the term "Design Patterns," but many haveno idea of where they come from and what they truly are. Consequently, some do notsee the value and benefits design patterns bring to the software development process,especially in the areas of maintenance and code reuse. This article will bridge this gap bydefining design patterns from a historical perspective. It will also summarize the salientfeatures of a typical design pattern and arrive at a working definition so that you willknow what they are and what to expect when you incorporate them into your designs.Finally, it will explicitly summarize the benefits design patterns bring to softwaredevelopment and why you should incorporate them into your work. Subsequent articleswill present more detailed descriptions of some of the more common design patterns,and how they can be applied to software development on the .NET platform.
What Are Design Patterns and Where Do They Come From?
Design patterns are commonly defined as time-tested solutions to recurring designproblems. The term refers to both the description of a solution that you can read, and aninstance of that solution as used to solve a particular problem. (I like the analogy of comparing design patterns to a class and an object instance of the class. Each is adifferent way to represent a thing.) Design patterns have their roots in the work of Christopher Alexander, a civil engineer who wrote about his experience in solving designissues as they related to buildings and towns. It occurred to Alexander that certaindesign constructs, when used time and time again, lead to the desired effect. Hedocumented and published the wisdom and experience he gained so that others couldbenefit. About 15 years ago, software professionals began to incorporate Alexander'sprinciples into the creation of early design pattern documentation as a guide to novicedevelopers. This early work led others to also write about design patterns and culminatedin the publication of
Design Patterns: Elements of Reusable Object-Oriented Software
in1995 by Eric Gamma, Richard Helm, Ralph Johnson, and John Vlissides. This book isconsidered to be the "coming out" of design patterns to the software community at largeand has been influential in the evolution of design patterns since.
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 insoftware development. Many more patterns have been documented and cataloged sincethe publishing of
. However, these 23 are probably the best known andcertainly the most popular.Design patterns are represented as relationships between classes and objects withdefined responsibilities that act in concert to carry out the solution. To illustrate a designpattern, consider the Adapter pattern, one of the original 23 patterns described in
. Adapter provides a solution to the scenario in which a client and server need tointeract with one another, but cannot because their interfaces are incompatible. Toimplement an Adapter, you create a custom class that honors the interface provided bythe server and defines the server operations in terms the client expects. This is a muchbetter solution than altering the client to match the interface of the server.The design pattern community is growing both in membership and coverage. The patternliterature describes new patterns that solve emerging issues related to technicaladvancements. As a software professional, you are the beneficiary of this body of knowledge. To use these patterns, you will need to learn them and become familiar with