S.O.L.I.D is the acronym for several important coding principles (programming Priciple) in object-oriented design and programming (Ood&oop).
SRP |
the single Responsibility principle |
single responsibility principle |
OCP |
the Open Closed principle |
|
LSP |
The Liskov Substitution Principle |
Richter substitution principle |
DIP |
the Dependency inversion Principle |
dependency inversion principle |
ISP |
the Interface segregation Principle |
interface separation principle |
Steve Smith has a solidify Your ASP at Microsoft TechEd 2009 in May, Derick.bailey's solid development principles–in Motivationa L Pictures A good explanation of the solid principle.
Single Responsibility Principle:
There is only one reason when a class needs to be modified (there should never is more THAN A-REASON for a class-to-change). In other words, to have a class take only one type of responsibility, this class needs to be decomposed when the class takes on other types of responsibility.
Open Closure Principle
Software entities should be extensible and non-modifiable. In other words, the extension is open, and the modification is closed. This principle is one of the most abstract and difficult to understand in many object-oriented programming principles.
The principle of the Richter replacement
When an instance of a subclass should be able to replace any instance of its superclass, there is a is-a relationship between them
Dependency Inversion principle
1. High-level modules should not be dependent on low-layer modules, both should be dependent on abstract
2. Abstractions should not be dependent on detail, and details should be dependent on abstraction
Interface Separation Principle
You cannot force users to rely on interfaces that they do not use. In other words, using multiple specialized interfaces is better than using a single total interface.
These principles are very basic and important object-oriented design principles. It is because of the fundamental nature of these principles that understanding and integrating these principles requires a lot of experience and knowledge. The above picture is a good commentary on these principles.
THS:
Http://www.cnblogs.com/shanyou/archive/2009/09/21/1570716.html
The solid principle of object-oriented design