当前位置:网站首页>Solid principle
Solid principle
2022-07-06 17:38:00 【Wzzzzzzx】
In terms of software architecture design , There is a general principle that cannot be bypassed , That's it SOLID principle
. The general principle consists of the initials of five principles , They are as follows :
- Principle of single responsibility (The Single Responsibility Prinlciple): Any software module should only be responsible for a certain kind of behavior
- Opening and closing principle (The Open/Closed Principle): Well designed software should be easy to extend , At the same time, it resists modification
- Richter's principle of substitution (The Liskov Substitution Principle): If you want to build software with replaceable components , Then these components should follow the same interface , So that they can freely replace each other
- Interface isolation principle (The Interface Segregation Principle): Unnecessary dependencies should be avoided in design
- Dependency Inversion Principle (The Dependency Inversion Principle): Depend on abstraction rather than concrete
Build a good software system , We should not only focus on the implementation level of the code , Pay more attention to the design of the overall architecture . A good architecture design can avoid most of the bug
, Cope with endless modifications and functional overlays . How to measure the quality of an architecture ? An important criterion is its maintainability . As a small change, you need to change a lot of code , When you ask some unexpected questions , Such architecture design must be bad . Secondly, readability . The code is to be read , Chaotic architecture will complicate the logic of the code , Increase the difficulty of understanding .
In order to design a good architecture ,SOLID principle
Through a series of principles to guide us How to correctly organize functions and data into components , And how to summarize these components into the final software .
边栏推荐
- BearPi-HM_ Nano development board "flower protector" case
- 案例:检查空字段【注解+反射+自定义异常】
- 03个人研发的产品及推广-计划服务配置器V3.0
- PySpark算子处理空间数据全解析(4): 先说说空间运算
- JVM garbage collector part 2
- CentOS7上Redis安装
- Essai de pénétration du Code à distance - essai du module b
- 灵活报表v1.0(简单版)
- Uipath browser performs actions in the new tab
- Wu Jun's trilogy insight (V) refusing fake workers
猜你喜欢
JVM class loading subsystem
全网最全tcpdump和Wireshark抓包实践
Development and practice of lightweight planning service tools
信息与网络安全期末复习(完整版)
集成开发管理平台
02个人研发的产品及推广-短信平台
CTF reverse entry question - dice
JVM 垃圾回收器之Serial SerialOld ParNew
Solr appears write Lock, solrexception: could not get leader props in the log
02 personal developed products and promotion - SMS platform
随机推荐
Quick start of Hongmeng system
04个人研发的产品及推广-数据推送工具
C version selenium operation chrome full screen mode display (F11)
[getting started with MySQL] fourth, explore operators in MySQL with Kiko
Deploy flask project based on LNMP
vscode
Start job: operation returned an invalid status code 'badrequst' or 'forbidden‘
Solrcloud related commands
Grafana 9 is officially released, which is easier to use and more cool!
轻量级计划服务工具研发与实践
Development and practice of lightweight planning service tools
03个人研发的产品及推广-计划服务配置器V3.0
Redis quick start
Essai de pénétration du Code à distance - essai du module b
当前系统缺少NTFS格式转换器(convert.exe)
Solr appears write Lock, solrexception: could not get leader props in the log
PySpark算子处理空间数据全解析(4): 先说说空间运算
全网最全tcpdump和Wireshark抓包实践
PostgreSQL 14.2, 13.6, 12.10, 11.15 and 10.20 releases
Detailed explanation of data types of MySQL columns