The seven principles of the Lee replacement principle, the Lee replacement of the seven

Source: Internet
Author: User

The seven principles of the Lee replacement principle, the Lee replacement of the seven

1. Single Responsibility Principle

That is, every class only focuses on one thing.

2. Lee's replacement principle

Sub-classes can replace the position where the parent class appears without affecting software functions.

3. Dependency inversion principle

Implementation depends on abstraction as much as possible without implementation

4. Interface isolation principle

The client should be provided with an independent interface as small as possible, rather than the overall large Interface

5. dimit's Law

That is, the minimum knowledge principle. A software entity should interact with other entities as little as possible.

6. Open and Close principles

That is, the code modification is disabled and the source code extension is enabled.

7. Principles of combination/aggregation Reuse

That is, a class should have an object with less inheritance.

Related Article

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.