当前位置:网站首页>【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
2022-07-25 21:40:00 【我去热饭】
你小时候是否玩过一些玩具车模型?
当你拆开玩具车的时候,是否会发现内部有的地方也刻画的非常精美,而这些地方如果不拆开,那么就永远都看不到。
此时你是否会想,这是否是一种浪费?
当你玩网络3d游戏,人物靠着墙的时候,不小心穿模,然后看到了人物内部构造,你是否会觉得,明明看不到的地方为什么还要开发呢?直接糊弄一下不行么?
…
其实,这些并不是你想的那样简单。
上点年纪的会告诉你,这并不是浪费,反而是节省。
玩具的底层内部,虽然看不到,但是因为制作工艺,机器的缘故,只能做成这样。不可能去精准的分清哪些看得到,哪些看不到。看得到的精雕细琢,看不到的改变方案粗俗对待。这样反而是增加辨识成本,增加机器设计难度。还是干脆全部生产成统一的模块,简单高效。
然后卖给各种玩具厂商,他们自行组装使用,看得到看不到的,就那样吧。毕竟增加机器设计成本才是最亏的。
3d游戏建模,对于人物来说,如果要精准的对可见部分才绘画和设计,对不可见部分随便做。那么以后的更新成本将会更高。
毕竟突然换了一件衣服,那么可见不可见的地方就变了,难道要重新设计人物躯体么?把那些没绘画设计好的部分弄好,然后把后来看不到的地方再次涂抹掉?这些费时费力的事谁来做?
当然不是,正确的是做好人物模型后,随便去匹配各种衣服,而这时候衣服的设计就可以非常自由了,会极大的提高生产力和效率。
所有这些心得,放到我们测试平台的设计和开发中,大家就会懂了。
有些东西底层,是直接拿组件来调用的,看到看不到也不用额外增加修改成本。
比如:测试平台的 菜单组件。
菜单存在于很多页面的顶部或者左侧边栏。
如果每个页面都手写一堆菜单代码,那是不是想当面麻烦,浪费精力?
所以开发者会把菜单做成组件,其他页面直接简单调用即可。
但是这样就会形成一个现象: 不同页面的菜单有不同的不可见部分。
如果你打开f12,发现了这些,那就有可能发出和本文开头一样的疑问,这些部分明明不可见,为什么还要写好再隐藏呢?这不是种浪费么?
边栏推荐
- Autojs learning - realize 3D perspective
- [leetcode ladder] linked list · 876 find the middle node of the linked list
- [leetcode ladder] linked list · 021 merge two ordered linked lists
- The inexplicability of Intel disassembly
- Unity metaverse (II), mixamo & animator hybrid tree and animation fusion
- Reading the pointpillar code of openpcdet -- Part 3: Calculation of loss function
- 【leetcode天梯】链表 · 876 查找链表中间结点
- Huawei occupies half of the folding mobile phone market, proving its irreplaceable position in the high-end market
- New maixhub deployment (v831 and k210)
- MySQL master-slave configuration
猜你喜欢

Byte side: can TCP and UDP use the same port?

IJCAI2022开会了! 微软等《领域泛化Domain Generalization》教程

Apple estimates that iPhone will give up the Chinese market, and the Chinese industrial chain needs to consider living a hard life

ORIGYN基金会正式启动$OGY Staking,引领新一轮生态利好

How to solve the problem of high concurrency and large traffic with PHP

Per capita Swiss number series, Swiss number 4 generation JS reverse analysis

919. Complete binary tree inserter: simple BFS application problem

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

2022 latest examination questions and answers of eight members (standard staff) of Shanghai Architecture

接口测试工具 restlet client
随机推荐
In depth understanding of seven specific ways to enhance code scalability
IJCAI2022开会了! 微软等《领域泛化Domain Generalization》教程
PE格式: 分析IatHook并实现
函数栈帧的创建和销毁
5、 Pinda general permission system__ PD tools XXS (anti cross site script attack)
ORIGYN基金会正式启动$OGY Staking,引领新一轮生态利好
919. 完全二叉树插入器 : 简单 BFS 运用题
Stm3 (cubeide) lighting experiment
Unity metaverse (II), mixamo & animator hybrid tree and animation fusion
How to evaluate hardware resources (number of CPUs, memory size) when Oracle migrates from small computers to x86 architecture? Is there a measurement index or company?
Dear bosses, how can I print the result of Flink SQL to the console and display it completely?
When facing complex problems, systematic thinking helps you understand the essence of the problem
零基础学习CANoe Panel(17)—— Panel CAPL Function
我也是醉了,Eureka 延迟注册还有这个坑!
Research on the scheme of MySQL advanced (VIII) sorting problem
[redis underlying parsing] linked list type
Automatic assembly and fuse degradation of feign
ES6 --- four powerful operators (?,? =,?.,?:)
Reading the pointpillar code of openpcdet -- Part 3: Calculation of loss function
H5 realize the animation effect of a scratch card