Design‎ > ‎

Design Pattern

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. 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.
 
The idea is not to re-invent the wheel. The idea of a design pattern is an attempt to standardize what are already accepted best practices.

Design patterns are not the code reuse, they are experience reuse.
 
Design Principle
1. Identify the aspects of your application that vary and separate them from what stays the same.
    Take the parts that vary and encapsulate them, so that later you can alter or extend the parts that vary without  affecting those that don't. 

2. Program to an interface (supertype), not an implementation.