Java Design Patterns

Source: Internet
Author: User

Design pattern-- Reusable Object-oriented Software Foundation (patterns)

I. Classification of design Patterns

In general, design patterns fall into three broad categories

Creation Mode: Factory method mode, abstract Factory mode, simple interest mode, builder mode, prototype mode (5 types )

Structural mode: Adapter mode, adorner mode, proxy mode, appearance mode, bridging mode, combined mode, enjoy meta-mode (7 kinds )

Behavioral Patterns: Policy mode, template method mode, observer pattern, iteration sub-pattern, responsibility chain mode, Command mode, Memo mode, state mode, visitor mode, intermediary mode, interpreter mode, (11 )

Other modes: and discovery mode and thread pool mode

The six principles of design pattern

1. Opening and closing principle (open close principle)

The opening and closing principle is to say to expand open, to modify close. When the program needs to be modified, can not modify the original code, to achieve a hot plug effect. So an overview of the sentence is: In order to make the programmer extensibility, easy to maintain and upgrade. To achieve such an effect, we need to use interfaces and abstract classes

2. The principle of substitution of Li Shi ()

Java Design Patterns

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.