Software Design Principles Extension

I. Introduction

7 classic principles of software design

Open Close Principle (OCP)
Dependence Inversion Principle (DIP)
Single Responsibility Principle (SRP)
Interface Segregation Principle (ISP)
Law of Demeter (LoD) , also known as: Least Knowledge Principle (LKP)
Liskov Substitution Principle (LSP)
Composite/Aggregate Reuse Principle (CARP)

This is a classic principle of programming. These principles have evolved into 23 design patterns.

Creational patterns: factory method pattern, abstract factory pattern, singleton pattern, builder pattern, prototype pattern.

Structural patterns: adapter pattern, decorator pattern, proxy pattern, appearance pattern, bridge pattern, combination pattern, flyweight pattern.

Behavioral patterns: Strategy pattern, Template method pattern, Observer pattern, Iterative sub pattern, Chain of responsibility pattern, Command pattern, Memo pattern, State pattern, Visitor pattern, Mediator pattern, Interpreter pattern.

In fact, this is an evolutionary process. The design of the 7 major principles is aimed at early programming, and the 23 design patterns are specifically used for the design framework. But now we often build complex systems, not just simple programs, nor some components and plug-ins. We should also have design principles for large systems. It is based on 7 principles and 23 design patterns.

2. Complex system design principles

1. Principle of universality

Versatility refers to the system design being reusable and compliant with industry standards.

2. Isolation principle

Isolation means that the system has a separate calling process and a separate database.

3. Permission control principle

The permission control principle means that the permissions should be designed when calling system functions.

4. Safety principles

The security principle refers to the need to fully consider network security and operational security when designing a system.

5. Scalability principle

The principle of scalability is that the system should be scalable, and the operation of old functions should not be affected when expanding.

6. Configurable principle

The configurability principle means that system design should consider the configurability of system parameters.

7. Opening and closing principle

The opening and closing principle is the same as the principle of programming. It should be closed to modification and open to expansion.

8. Compatibility principle

The compatibility principle means that the new version of the system should be compatible with the old version of the system.

9. Principle of easy development and easy deployment

The principle of easy development and easy deployment means that the development system should consider team assistance to facilitate development and online deployment.

3. Expansion of design principles

1. Modularization: Divide the software into small modules. Each module should be as independent and reusable as possible to facilitate modification and maintenance. This improves the scalability and maintainability of the software.

2. Loose coupling: Reduce dependencies between modules and reduce coupling, making each module more independent and easier to maintain and test.

3. High cohesion: Organize codes with the same functions together to reduce code duplication and redundancy, and improve code readability and maintainability.

4. Scalability: The scalability of the software should be considered during the design stage, that is, the ability to meet changes and expansions in future needs.

5. Reliability: The software should be highly reliable and robust, able to operate normally under various circumstances, and not vulnerable to attacks.

6. Performance: The system should have good performance, be able to handle large amounts of data and user requests, and have fast response times.

7. Simplicity: The architecture and code should be concise and clear, easy to read and understand, and avoid over-design.

8. Portability: Software should have cross-platform and cross-system capabilities to run in different environments.

9. Testability: The system should be easy to test, including unit testing, integration testing, system testing, etc., to ensure the quality and stability of the software.

10. Ease of use: The software should have a good user experience and an easy-to-use interface to increase user satisfaction. It needs to be easy to understand, easy to learn, etc.

11. Security: Software should have good security and be able to prevent illegal intrusions, data leaks and other security issues. Ensure the security of user data and privacy and avoid hacker attacks and malware intrusions.

12. Code maintainability: Software should be easy to maintain and repair, including code readability, understandability, and scalability, to reduce maintenance costs and improve code quality.

13. Reliability: The software should have a high degree of reliability, that is, the software can ensure correctness and accuracy under normal operation, and can effectively handle and recover when abnormal situations occur.

14. Scalability: The software should have good scalability and scalability to maintain performance and stability as the number of users and data volume continue to increase.

15. Reusability: Software should be highly reusable, that is, modules and components in the software can be reused in other projects to improve development efficiency and code quality.

16. Traceability: Software should have a high degree of traceability, that is, all actions in the software should be clearly recorded to facilitate review, auditing and tracing.

17. Configurability: Software should be easily configurable and manageable to adapt to different environments and needs.

18. Portability: Software should be easily portable and portable to different operating systems, platforms, and devices.

19. Scalability: Software should be easily expandable and upgradeable to adapt to different business needs and functional requirements.

20. Reliability: Software should have high reliability, that is, it should be able to run stably, be less error-prone, and be able to effectively handle exceptions and error conditions.

21. Accessibility: Software should be easy to access and use so that it can be used by users of different groups and abilities.

22. Installability: Software should be easy to deploy, maintain and manage to reduce maintenance costs and improve code quality.

23. Customizability: The software should have good customizability, allowing users to customize settings according to their own needs to meet individual needs.

24. Credibility: Software should have a high degree of credibility, that is, users can trust the accuracy, reliability and stability of the software to meet user needs.

25. Documentation and comments: During the software development process, relevant documents and comments need to be written so that developers and users can understand the functions and usage of the software.

26. Team collaboration: Team collaboration is required during the software development process, including task allocation, code sharing, communication, etc. Design software architecture to be easy for team collaboration and development.

27. Technology selection: In the software development process, it is necessary to select the appropriate technology stack and tools to ensure efficient development and excellent quality of software.

Guess you like

Origin blog.csdn.net/dongjing991/article/details/133126902