Programming Principles:
Comprehensive consideration, development schedule, quality requirements to complete the architecture design
Fundamentals have (MindSet)
- interface-oriented programming (dependency interface, not implementation)
- Layered design, loosely coupled.
- Open and Close principle: The modification is closed, the new opening (the specific operation can be implemented by configuration, reflection, etc.)
- Interface isolation principle (to ensure the uniqueness of the interface, avoid a hodgepodge)
- Multi-state substitution principle (subclass override the parent class's method cannot modify its function, that is, to keep the abstract parent class and the various subclass methods of the same functionality)
- Consider program interaction IO (to ensure efficient use of specific throughput)
- The pre-process must consider the scalability of the program, maintainability has been scalability
Basic Class Design Essentials:
- Single
- Strong cohesion, loose coupling. (not only is programming to do things, strong cohesion, loose coupling should always be in the mind anyway)
- Good encapsulation, (interface to reasonable, physical design for the fact, do not have much interface, many, good)
- The granularity of the class should be reasonable
- Consider the correctness of dependencies. (Do not reverse-rely on inverted errors, such as the design of the logical layer and the UI, you are in the logical class of the process relies on the interface of the UI layer and contrary to the design of the program)
- Consider reusability (not only for programming to do things, reusability should always be in the mind anyway, such as public util, ancestors can be abstracted to achieve public parts, etc.)
There is no column-type design, only the basic skills of continuous integration. The basic need to clear and fierce, design nature will help.
Some principles of object-oriented design process