Introduction to design patterns-a quick understanding

Design pattern source:

As early as 1977, Christopher Alexander. He is an architect, he came up with a concept called "pattern language" but this pattern language is not prepared for software, but for architecture. For Christopher Alexander, in our In the actual construction work, there are some experience summarized by the predecessors, which can be inherited and summarized, so I wrote a book "A Pattern Language". It can be said that this is the originator of our software design patterns.

In the 1990s, there were four young people. If we introduce the model to the software field and summarize our common software behaviors, wouldn't it be a very meaningful thing. Soon the four of them also wrote a book together called "Design Patterns" which is the source of design patterns. Our term "design pattern" is derived from this book. The four people are:
Erich Gamma
Richard Helm
Ralph Johnson
John Vlissides

What is a design pattern?

Design patterns are not a certain technology, nor are they affiliated with a certain language. Design patterns are the design experience summarized by predecessors.

It mainly serves object-oriented languages.

The design pattern abstracts the main software application environment in our daily development. Through a series of sophisticated designs, we can make our software more secure, easier to maintain, and have better readability.


The goal of the design pattern: the code is easier to understand and easier to maintain. At the same time, the design pattern can make the code more reliable and more suitable for the development of industrialization.


For design patterns, it is the knowledge that each of our programmers must master

Design pattern behavior classification:

Can be divided into three categories:

1, create a schema
purpose: how to create a more sophisticated some objects


2. Structural model
means: in the software structure, through reconstruction and abstraction, our software becomes more organized and easier to maintain


3. The behavioral model
is designed and optimized for a specific business scenario in reality.

These three types of design models perform their own duties, and they are mutually constrained. Creating a model in the learning process is the basis of all other models.

I wish you all a happy festival 1024! ! !

Guess you like

Origin blog.csdn.net/Turniper/article/details/109260669