Design Patterns: Preamble

The so-called design patterns that people will develop the solution to the problem encountered repeatedly summed up .

Design from life, all design patterns can be constructed with the real world imaginable. How will these concepts, principles, using easy to understand, more vivid words to describe my mind.

Pattern Classification

 

Range \ purpose Creating type Structural Behavioral
Class mode Factory Method pattern (Category) adapter mode Interpreter pattern
Template Method Pattern
Object Model Abstract factory pattern
builder pattern
prototype pattern
singleton
(Object) adapter mode
bridge mode
combination pattern
decorative patterns
appearance mode
Flyweight
proxy mode
Duty chain
command mode
iterative mode
intermediary model
memorandum mode
observer mode
state mode
strategy pattern
Visitor Pattern

 

According to the intended use classification

According to different purposes of use, these modes can be roughly divided into three categories.

1. Create type

Create a design model is something about the way to create objects . You can choose to create objects using appropriate way according to the actual situation.

The traditional way to create a new class objects may cause some design issues, or increase the complexity of the design.

Using the appropriate creational design patterns you can solve this problem.

2. Structural

Structural design pattern is to describe how the classes and objects together to form larger structures .

Like building blocks to form complex, more powerful structure you available by combining simple building blocks.

3. Behavioral

Behavioral design pattern is to describe the interaction and responsibilities assigned class or object .

According to the scope of the classification process

Depending on the processing range, pattern design mode can be divided into classes and object model.

1. Mode Class

Class models handle the relationship between classes and subclasses to build these relationships by inheritance, are static relationships , finalized at compile time.

2. Object Model

Object model dealing with the relationship between objects , when the change operation, is the dynamic relationship .

Guess you like

Origin www.cnblogs.com/martini-d/p/tong-guo-xiang-xiang-lai-xue-xi-she-ji-mo-shi.html