1. Single responsibility

A class should only do one thing

\

2. Open and close principle

Open to extension, closed to modification

\

3. Richter’s substitution

Unified call in the name of the parent class, using specific subclasses assigned to achieve polymorphism.

\

4. Rely on inversion

It’s another statement of The Richter’s substitution principle. For interface, abstract programming, in fact, that is, in the name of the parent class unified call, when using the specific subclass, to achieve polymorphism.

\

5. Interface isolation

A single principle for interfaces. An interface has only one responsibility. Therefore, a large or fat interface should be divided into several smaller interfaces.

\

6. Synthetic multiplexing

Use class associations whenever possible to avoid inheritance.

\

Demeter’s Rule

A class should have as few relationships with other classes as possible. If a group of classes are called across each other, they can be forwarded by setting up an intermediate class.