The basic principle of object-oriented design http://www.cnblogs.com/malaikuangren/archive/2012/03/22/2411315.html
Interface:
Understand:
An agreement between the parties.
Benefits:
interface and implementation separation;
Easy to expand;
Object-Oriented design principles:
Single principle of responsibility:
The function of a class is to be single, only to do things related to it. In the design process of the class to be in accordance with the responsibility of the design, each other to stay orthogonal, non-interference.
The principle of the Richter substitution:
Facilitates the interchange of subclasses and parent classes.
Dependency Inversion principle:
Programming for the interface, not for the implementation of programming;
The upper modules should not be dependent on the underlying modules, they should all be dependent on abstraction. The details depend on abstraction.
Interface Isolation principle:
Do not provide a large interface, the function as single as possible. Interface Mandarin is bloated, affecting readability and efficiency. (a single duty principle is similar)
Dimitri Principle:
Reduce the association between objects.
Open Closure principle:
is open to expansion;
The modification is closed.
Object-oriented design idea: The basic principle of object-oriented design