当前位置:网站首页>【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
2022-07-25 21:40:00 【我去热饭】
你小时候是否玩过一些玩具车模型?
当你拆开玩具车的时候,是否会发现内部有的地方也刻画的非常精美,而这些地方如果不拆开,那么就永远都看不到。
此时你是否会想,这是否是一种浪费?
当你玩网络3d游戏,人物靠着墙的时候,不小心穿模,然后看到了人物内部构造,你是否会觉得,明明看不到的地方为什么还要开发呢?直接糊弄一下不行么?
…
其实,这些并不是你想的那样简单。
上点年纪的会告诉你,这并不是浪费,反而是节省。
玩具的底层内部,虽然看不到,但是因为制作工艺,机器的缘故,只能做成这样。不可能去精准的分清哪些看得到,哪些看不到。看得到的精雕细琢,看不到的改变方案粗俗对待。这样反而是增加辨识成本,增加机器设计难度。还是干脆全部生产成统一的模块,简单高效。
然后卖给各种玩具厂商,他们自行组装使用,看得到看不到的,就那样吧。毕竟增加机器设计成本才是最亏的。
3d游戏建模,对于人物来说,如果要精准的对可见部分才绘画和设计,对不可见部分随便做。那么以后的更新成本将会更高。
毕竟突然换了一件衣服,那么可见不可见的地方就变了,难道要重新设计人物躯体么?把那些没绘画设计好的部分弄好,然后把后来看不到的地方再次涂抹掉?这些费时费力的事谁来做?
当然不是,正确的是做好人物模型后,随便去匹配各种衣服,而这时候衣服的设计就可以非常自由了,会极大的提高生产力和效率。
所有这些心得,放到我们测试平台的设计和开发中,大家就会懂了。
有些东西底层,是直接拿组件来调用的,看到看不到也不用额外增加修改成本。
比如:测试平台的 菜单组件。
菜单存在于很多页面的顶部或者左侧边栏。
如果每个页面都手写一堆菜单代码,那是不是想当面麻烦,浪费精力?
所以开发者会把菜单做成组件,其他页面直接简单调用即可。
但是这样就会形成一个现象: 不同页面的菜单有不同的不可见部分。
如果你打开f12,发现了这些,那就有可能发出和本文开头一样的疑问,这些部分明明不可见,为什么还要写好再隐藏呢?这不是种浪费么?
边栏推荐
- GDB locates the main address of the program after strip
- NPM module removal_ [solved] after NPM uninstalls the module, the module is not removed from package.json [easy to understand]
- ES6 -- Deconstruction assignment
- When MySQL imports data, it has been changed to CSV utf8 file and the file name is English. Why does it still fail to import
- Share | intelligent fire emergency management platform solution (PDF attached)
- Pyg tutorial (8): calculate a more efficient sparse matrix form
- I'm also drunk. Eureka delayed registration and this pit!
- 图片怎么存储到数据库里「建议收藏」
- 【Flink】FLink RocksDBListState 报错 You cannot add null to a ListState
- Database SQL statement exercise "suggestions collection"
猜你喜欢

Reading the pointpillar code of openpcdet -- Part 3: Calculation of loss function

Optimization analysis of storage structure and IO performance of openharmony littlefs file system

工作面试总遇秒杀? 看了京东 T8 大咖私藏的秒杀系统笔记, 已献出膝盖

Performance debugging -- chrome performance
QT | learn about QT creator by creating a simple project

C#Socket

Huawei occupies half of the folding mobile phone market, proving its irreplaceable position in the high-end market

Job interviews are always a second kill? After reading the seckill system notes secretly stored by JD T8, I have given my knees

Pyqt5 use pyqtgraph to draw multiple y-value scatter plots

Sentinel vs Hystrix 限流对比,到底怎么选?
随机推荐
Creation and destruction of function stack frames
Zero basic learning canoe panel (17) -- panel CAPL function
新版Maixhub部署(V831与K210)
[leetcode ladder] linked list · 021 merge two ordered linked lists
NPM module removal_ [solved] after NPM uninstalls the module, the module is not removed from package.json [easy to understand]
Experience sharing of system architecture designers preparing for the exam: from point to surface
cts测试步骤(卡西欧cts200测试)
腾讯云数据库的可信可控之路
Face and key point detection: yolo5face practice
Why do independent sellers like to do e-mail marketing? The original conversion rate can be improved so much!
CTS test steps (Casio cts200 test)
【leetcode天梯】链表 · 876 查找链表中间结点
Origen foundation officially launched $ogy stacking, leading a new round of ecological benefits
工作面试总遇秒杀? 看了京东 T8 大咖私藏的秒杀系统笔记, 已献出膝盖
性能调试 -- Chrome Performance
如何用 Redis 实现分布式锁的?
【Redis底层解析】链表类型
Programmer's Guide to health quenching 5: introduction to sports Basics
How to store pictures in the database "suggested collection"
ES6 -- Deconstruction assignment