Design Pattern-Initial Knowledge

Source: Internet
Author: User

Official definition: design pattern is a set of designs that are repeatedly used, known to most people, classified and catalogued,CodeSummary of design experience. The design pattern is used to make code reusable, make it easier for others to understand, and ensure code reliability. There is no doubt that the design model is a win-win solution for yourself, others, and systems. The design model enables code compilation to be truly engineered, and the design model makes the foundation of software engineering, just like building blocks of bricks and stones.

We have recently started the design model. Our learning focuses on "big talk design model", and we will repeat the model of the entire book. It would take a month to add a summary or something. This is a huge project. When we encounter unknown problems, we always worry about fear. You are not going to go, and the mountains are all there. You will never see the scenery on the other side if you don't look through this hill.

The following is a preliminary introduction to the design model:

1 principle: single responsibility, open/closed, dependency inversion, Lishi replacement, interface isolation, and the Demeter method (minimum knowledge principle)

There are 23 types of design patterns: creation, structure, and behavior.

2 Creation type: Singleton, abstract factory, builder, factory method, prototype

Structural, adapter, bridging, decoration, combination, appearance, Meta, proxy

Behavior Type: Template Method, command, iterator, observer, intermediary, memo, interpreter, status, responsibility chain, and accessors.

We need to learn the 23 models of the design model and be proficient in them. These 23 models are like 23 molds, which can be used if needed. Select different models based on different requirements. Then how do we know which model we need to choose? According to authoritative sources, different models (Masters) have different focuses, so we should select the appropriate model based on the characteristics of the model. I don't know much about it now, so I will learn it later.

Now, I am ready to learn the path of pattern design.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.