当前位置:网站首页>结构化设计的概要与原理--模块化
结构化设计的概要与原理--模块化
2022-07-28 15:58:00 【从一而终】

技术一般 不会贴图 原谅!!!
怎样做好软件开发过程中的模块化是一个值得思考的问题。
在思考这个问题之前,我曾做了当前工作中的项目代码部分重构,我自己给自己定的重构原则是,按照职责单一来划分模块。在函数拆分中将功能能构独立出来的代码行拆分成一个函数封装成一个接口。
在没有见到上图之前,我没有觉得自己哪里不对,但是上图引发了我的一个思考,我的拆分原则有没有问题,按照书面知识看似毫无破绽,面向对象的设计原则其中一条讲的就是单一职责原则。但是事务总是在带来好处的地方也带来负面效应,过度的拆分导致模块调用的过程中接口增多。接口成本也随之增加。这是一个问题,那么我们到底该如何进行模块拆分。
又是一些没有营养的建议,我恶心下自己:
1 拆分原则,还是按照书本上的知识--单一职责原则。
2 具体实施,根据业务场景进行功能的划分与合并,然后进行拆分。
3 一些业务无关的工具模块拆分越细越好,这些东西积累起来就是财富,越细越容易被重复使用。
。。。后续想到补充
边栏推荐
- 有趣的 Kotlin 0x09:Extensions are resolved statically
- 有趣的 Kotlin 0x0A:Fun with composition
- Use js direct OSS to store files in Alibaba cloud and solve the limitation of large file upload server
- Mysql与Oracle的13点区别
- CRC16数据校验支持ModelBus和XMODEM校验模式(C语言)
- FX3开发板 及 原理图
- QT packaging
- Using pyqt to design gui in ABAQUS
- CRC16 data verification supports modelbus and XMODEM verification modes (C language)
- MySQL5.7及SQLyogV12安装及使用破解及常用命令
猜你喜欢

Use js direct OSS to store files in Alibaba cloud and solve the limitation of large file upload server

Abaqus GUI界面解决中文乱码问题(插件中文乱码也适用)

小程序:获取元素节点信息

有趣的 Kotlin 0x06:List minus list

有趣的 Kotlin 0x07:Composition

Interesting kotlin 0x0a:fun with composition

快速掌握 Kotlin 集合函数

Using pyqt to design gui in ABAQUS

HM二次开发 - Data Names及其使用

有趣的 Kotlin 0x0A:Fun with composition
随机推荐
在vs code上配置Hypermesh二次开发环境
HyperMesh运行脚本文件的几种方法
Early in the morning, pay Bora SMS to say that you won the "prize"? Dealing with server mining virus - kthreaddi
QT designer for QT learning
Pop up layer prompt in the background
Interesting kotlin 0x06:list minus list
HM secondary development - data names and its use
Kubeedge releases white paper on cloud native edge computing threat model and security protection technology
Redis系列4:高可用之Sentinel(哨兵模式)
Signal shielding and processing
FX3开发板 及 原理图
Fx3 development board and schematic diagram
Implementation of paging
TCP handshake, waving, time wait connection reset and other records
Sort 2 bubble sort and quick sort (recursive and non recursive explanation)
Ansa secondary development - build ansa secondary development environment on Visual Studio code
Splash (rendering JS service) introduction installation
Microsoft question 100 - do it every day - question 11
【从零开始学习SLAM】将坐标系变换关系发布到 topic tf
asp.net大文件分块上传断点续传demo