6 programming principles of Android

Object-oriented principles

1. Single principle

2. The principle of substitution

The essence is inheritance and polymorphism, inheritance or implementation class can replace the parent class

3. Rely on the principle of inversion

The essence is interface-oriented (abstract class) programming

4. Opening and closing principle

Open to expansion, closed to modification
How to achieve the essence is also oriented to abstract programming

5. Interface isolation

The interface needs to be disassembled fine enough

6. Dimit principle

A class should know the least about the objects it calls.

Published 589 original articles · praised 1040 · 1.87 million views

Guess you like

Origin blog.csdn.net/u010321471/article/details/105649127