1. single Duty principle (Responsibility Principle) 2. Richter Replacement principle (Liskov Substitution Principle) 3. Dependency inversion principle (dependence inversion Principle) 4. Interface Isolation principle (Interface segregation Principle) 5. Dimitri (Law of Demeter) 6. Open Close Principle A single principle of responsibility (SRP) if a class takes on too much responsibility, it is tantamount to coupling those responsibilities together. A change in one's responsibilities may weaken or inhibit the ability of this class to perform other duties. This coupling results in a fragile (fragile) design that can be subjected to unexpected damage when the change occurs. Ii. Open-closure principle (OCP) 1. " is open for extensions "(open for extension). This means that the behavior of the module can be extended. When the requirements of the application change, we can extend the module to the new behavior that satisfies those changes. In other words, we can change the function of the module. 2. "For the change is closed" (Closed for modification). When you extend the behavior of a module, you do not have to change the module's source code or the binaries. The binary executable version of the module, whether it is a linked library, DLL, or java. jar file, does not need to be changed. The Liskov substitution principle (LSP) subtype (subtype) must be able to replace their base type (base type) Four, dependency inversion principle (DIP) a. High-level modules should not be dependent on low-layer modules. Both should be dependent on abstraction. B. Abstraction should not depend on detail. The details should depend on abstraction. The interface Isolation principle (ISP) should not force customers to rely on methods that they do not use. Interface methods should be relevant, try to separate the "fat" interface.
Object-oriented principles