In Software Engineering,  

                             A design pattern is a general repeatable solution to a commonly occurring problem in software design.

In Object Oriented Programming language,

                            A design or algorithm or pseudo-code that solves problem commonly occurring problem, efficiently.

Here design patterns with respect to OOPS concept will be explained.

A common occurring problem could be

  1. code complexity,such as repeated business logic,
  2. communication between the objects efficiently
  3. resource usage, such as: memory usage, database connectivity and so-on.

A design made as just solution for common occurring problems

                           A design pattern isn’t a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.

Advantages:

                          Design patterns can speed up the development process by providing tested, proven development model. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns.

Design patterns are classified into 4 groups:

  • Creational,
  • Behavioral ,
  • Structural, and
  • Web .

Creational  Design Pattern

Design made for instantiation for specific purpose efficiently.

Structural Design Pattern

     Design for Class and Object composition.

Behavioral Design Pattern

Design made for communication between the objects.

Web Design Pattern

Designs are specifically concerned with the presentation tier.

Advertisements