Java Design Patterns

Source: Internet
Author: User

First, the six principles of design pattern

① Opening and closing principle

Open for extensions, close for modifications.

The principle of substitution of ② Richter

Where any base class appears, subclasses must be able to appear.

③ Dependency Reversal principle

Programming to interfaces, dependent on abstraction, does not depend on specifics.

④ Interface Isolation principle

Using multiple isolated interfaces is better than using a single interface. (Reduce dependence, reduce coupling)

⑤ Synthesis/reuse principle

The principle is to use composition/aggregation as much as possible, rather than using inheritance.

⑥ Dimitri Law (least known principle)

An entity should function as little as possible with other entities, making the system module functions relatively independent.

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.