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.