Java and mode Reading Notes 1 (1-11)

Source: Internet
Author: User

principle of open and closed
Open-Close principle (OCP)
softeware entities shocould be open for extension, but closed for modification.
Rishi replacement principle
liskov substitution principle (LSP)
if there is an object O1 whose class is T1, so that all programs defined in t1 P does not change the behavior of program P when all object O1 is replaced with O2, then class T2 is a subclass of class T1.
concerning the relationship between parent and child classes, Mozi Xiaoyu:
"White Horse, Ma Ye. Take the white horse and take the horse. Ma and Ma Ye. Take the horse and take the horse. And people.
love and love. Hey, people. Love and love. This is also the creator.
ridehorse (Horse horse);-> ridehorse (Whitehorse);
otherwise, it cannot be set up. Get the kiss of others. His younger brother and beauty. AIDI, non-beauty lovers.
Car and wood. Take a bus, not take a wooden ride. Boat, wood also. Take a boat. People who have stolen it. More thieves, not more
people. No leeching, no leeching.

 
Dependency reversal Principle
Dependence inversion principle (DIP)
Revoke actions shoshould NOET depend upon details.
Details shoshould depend upon already actions.
 
Interface isolation principle
Interface segregation principle (ISP)
It is better to use multiple special interfaces than to use a single large Interface
 
Principles of merging/aggregation multiplexing
Composite/aggregate Reuse Principle (CARP)
Merging is the aggregation of Values
Aggregation is referenced aggregation.
 
Dimit Law
Law of Demeter (D3S)
Or: least knowledge principle (LKP)

Someone> friend
It often makes the people ignorant and heartless.

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.