当前位置:网站首页>Outline and principle of structured design -- modularization
Outline and principle of structured design -- modularization
2022-07-28 16:52:00 【be faithful to one 's husband unto death】

The technology is average No mapping Forgive !!!
How to do a good job of modularization in the process of software development is a problem worth thinking .
Before thinking about it , I have done some refactoring of the project code in my current work , The refactoring principle I set for myself is , Divide the modules according to the single responsibility . In function splitting, the code lines with independent function structures are split into a function and encapsulated into an interface .
Before I see the picture above , I don't think I'm wrong , But the picture above triggered my thinking , Is there a problem with my split principle , According to written knowledge, it seems to be flawless , One of the principles of object-oriented design is the principle of single responsibility . But affairs always bring negative effects where they bring benefits , Excessive splitting leads to more interfaces in the process of module calling . Interface costs also increase . That's a problem , So how do we split modules .
There are also some suggestions without nutrition , I feel sick of myself :
1 Resolution principle , Or according to the knowledge in books -- Principle of single responsibility .
2 Specific implementation , Divide and merge functions according to business scenarios , And then split it .
3 Some business independent tool modules can be split as fine as possible , These things accumulate into wealth , The thinner it is, the easier it is to be reused .
... Follow up to add
边栏推荐
- Brother Ali teaches you how to correctly understand the problem of standard IO buffer
- 阿里云-武林头条-建站小能手争霸赛
- LwIP develops | socket | TCP | keepalive heartbeat mechanism
- Best Cow Fences 题解
- Solve the width overflow of rich text pictures such as uniapp
- Tcp/ip related
- Multiple commands produce ‘.../xxx.app/Assets.car‘问题
- Sort 2 bubble sort and quick sort (recursive and non recursive explanation)
- Interesting kotlin 0x09:extensions are resolved statically
- Oracle table partition
猜你喜欢

Ansa secondary development - build ansa/meta secondary development environment on pycharm

Learn to use MySQL explain to execute the plan, and SQL performance tuning is no longer difficult

【指针内功修炼】字符指针 + 指针数组 + 数组指针 + 指针参数(一)

排序2-冒泡排序与快速排序(递归加非递归讲解)

Ruoyi集成flyway后启动报错的解决方法

Interesting kotlin 0x06:list minus list

在vs code上配置Hypermesh二次开发环境

有趣的 Kotlin 0x0A:Fun with composition

Sort 3-select sort and merge sort (recursive implementation + non recursive implementation)

Applet: get element node information
随机推荐
【指针内功修炼】字符指针 + 指针数组 + 数组指针 + 指针参数(一)
配置web服务器步骤详细记录(多有借鉴)
Analysis of echo service model in the first six chapters of unp
排序1-插入排序与希尔排序
Efficiency comparison of three methods for obtaining timestamp
Nowcode- learn to delete duplicate elements in the linked list (detailed explanation)
阿里大哥教你如何正确认识关于标准IO缓冲区的问题
Li Hongyi, machine learning 4. Deep learning
遭MQ连连干翻后的醒悟!含恨码出这份MQ手册助力秋招之旅
LeetCode每日一练 —— 剑指Offer 56 数组中数字出现的次数
微软100题-天天做-第11题
Ansa secondary development - Introduction to interface development tools
Sort 3-select sort and merge sort (recursive implementation + non recursive implementation)
排序5-计数排序
Best Cow Fences 题解
About the web docking pin printer, lodop uses
微软100题-天天做-第16题
First day of QT study
Multiple commands produce ‘.../xxx.app/Assets.car‘问题
Understanding of asmlinkage