The first part of the 6 design principles __6 Large design principles

Source: Internet
Author: User

As a technician, the most basic quality is honesty. "Know to know, do not know to do not know", they do not understand that there is no relationship, to learn, life-long learning, but do not try, this grasp a little bit, that dig a little, as if everything understand, in fact, nothing understand. China advocates complex talent, which is misleading to young people. First lean a technology, and then divergent learning, the first point behind is the right path.

(1) The principle of single responsibility: a class is responsible for only one functional area of responsibility, or can be defined as: In a class, there should be only one reason for it to change


(2) The Richter replacement principle: All references to base class (parent) must be able to transparently use objects of its subclasses



(3) The dependency inversion principle: abstractions should not depend on detail, and details should be dependent on abstraction. In other words, to program for an interface, not for implementation


(4) Interface Isolation principle: the use of a number of specialized interfaces, rather than a single total interface, that is, the client should not rely on those it does not need the interface



(5) Dimitri rule: a software entity should interact with other entities as little as possible.



(6) Opening and closing principle: a software entity should be open to the expansion, the modification closed. That is, the software entity should try to expand without modifying the original code.


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.