Tuesday, 16 April 2013

Brief History Of Design Pattern

Design patterns were first described by architect "Christopher Alexander" in his book
A Pattern Language: Towns, Buildings, Construction (Oxford University Press, 1977). The concept he introduced and called patterns -- abstracting solutions to recurring design problems -- caught the attention of researchers in other fields,especially those developing object-oriented software in the mid-to-late 1980s.


In 1987, Cunningham and Beck used Alexander’s ideas to develop a small pattern language for Smalltalk (a programming language) .


In 1990, Gamma, Helm, Johnson and Vlissides also known as The Gang Of Four(GOF) begin work compiling a catalog of design patterns.

In 1991, Bruce Anderson gives first Patterns Workshop at OOPSLA.


OOPSLA : Obect Oriented Programming, Systems, Languages & Applications) is an annual ACM(Association Of Computing Machinery) research conference. OOPSLA mainly takes place in the United States, while the sister conference of OOPSLA, ECOOP, is typically held in Europe. It is operated by the Special Interest Group for Programming Languages (SIGPLAN) group of the ACM.
OOPSLA is an annual conference covering topics related to object-oriented programming systems, languages and applications.


In 1993, Kent Beck and Grady Booch sponsor the first meeting of what is now known as the Hillside Group.

In 1994,first Pattern Languages of Programs (PLoP) conference held.

In 1995, research into software design patterns led to what is probably the most influential book on object-oriented design: Design Patterns: Elements of Reusable Object-Oriented Software, by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Addison-Wesley, 1995;). These authors are often referred to as the "Gang of Four" and the book is referred to as the Gang of Four (or GoF) book.
The largest part of Design Patterns is a catalog describing 23 design patterns.
Other, more recent catalogs extend this repertoire and most importantly, extend coverage to more specialized types of problems. Mark Grand, in Patterns in Java: A Catalog of Reusable Design Patterns Illustrated with UML, adds patterns addressing problems involving concurrency, for example, and Core J2EE Patterns: Best Practices and Design Strategies by Deepak Alur, John Crupi, and Dan Malks focuses on patterns for multi-tier applications using Java 2 enterprise technologies.There is an active pattern community that collects new patterns, continues research, and takes leads in spreading the word on patterns. In particular, the Hillside Group sponsors many conferences including one introducing newcomers to patterns under the guidance of experts. Resources provides additional sources of information about
patterns and the pattern community.

Wednesday, 12 December 2012

What is the relationship among these patterns?


In your application, you will use many design pattern. It rarely happen that you will use only one or none design pattern, until you are  you are making a+b program.
Generally, to build a system, you may need many patterns to fit together. Different designer may use different patterns to solve the same problem. Usually:
  • Some patterns naturally fit together
  • One pattern may lead to another
  • Some patterns are similar and alternative
  • Patterns are discoverable and documentable.
  • Patterns are not methods or framework
  • Patterns give you hint to solve a problem effectively

How many design patterns?


There are many design patterns. A site says at least 250 existing patterns are used in OO world, including Spaghetti which refers to poor coding habits. The 23 design patterns by GOF are well known, and more are to be discovered on the way.
Note that the design patterns are not idioms or algorithms or components.

Spaghetti  Code: Spaghetti code is a pejorative term for source code that has a complex and tangled control structure, especially one using many GOTOs, exceptions, threads, or other "unstructured" branching constructs. It is named such because program flow tends to look like a bowl of spaghetti, i.e. twisted and tangled. Spaghetti code can be caused by several factors, including inexperienced programmers and a complex program which has been continuously modified over a long life cycle. Structured programming greatly decreased the incidence of spaghetti code.

Need Of Design Pattern(Do I have to use the design pattern?)

If you want to be a professional Java developer, you should know at least some popular solutions to coding problems. Such solutions have been proved efficient and effective by the experienced developers. These solutions are described as so-called design patterns.

Many programmers with many years experience don't know design patterns, but as an Object-Oriented programmer, you have to know them well, especially for new Java programmers. Actually, when you solved a coding problem, you have used a design pattern. You may not use a popular name to describe it or may not choose an effective way to better intellectually control over what you built. Learning how the experienced developers to solve the coding problems and trying to use them in your project are a best way to earn your experience and certification.

Design Pattern have two main usages:
  • Common language for developers: They provide developer a common language for certain problems. For example if a developer tells another developer that he is using a Singleton, the another developer (should) know exactly what this means.
  • Capture best practices: Design patterns capture solutions which have been applied to certain problems. By learning these patterns and the problem they are trying to solve a unexperienced developer can learn a lot about software design.


    Design pattern are based on the base principles of object orientated design.
    • Program to an interface not an implementation
    • Favor object composition over inheritance

Sunday, 9 December 2012

what is Design Pattern

                                               What is Design Pattern

First we consider the term Pattern:
 
“Pattern” as the name suggests, means series of events occurring in a definite order. The patterns can be found in Java and J2ee technologies also. Many a times, we find that there is a particular way of tackling a problem. This way is easy and has been used many times successfully by a number of people earlier also. This method becomes a pattern.

Learning the design patterns is a multiple step process:
1. Acceptance
2. Recognition
3. Internalization


One line defination of Design Pattern could be: 
“Design patterns are recurring solutions to design problems.”
Here Design Problems is the problem for which you have to make application.

The design patterns are language-independent strategies for solving common object-oriented design problems.

"Design Patterns are best practices how to solve common know problems"  


The terminology of "Design Pattern" in software development is based on the GOF (Gang of Four) book "Design Patterns - Elements of Reusable Object-Oriented Software" from Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Design Pattern are proven solutions approaches to specific problems. A design pattern is not framework and is not directly deployed via code.