当前位置:网站首页>【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
2022-07-25 21:40:00 【我去热饭】
你小时候是否玩过一些玩具车模型?
当你拆开玩具车的时候,是否会发现内部有的地方也刻画的非常精美,而这些地方如果不拆开,那么就永远都看不到。
此时你是否会想,这是否是一种浪费?
当你玩网络3d游戏,人物靠着墙的时候,不小心穿模,然后看到了人物内部构造,你是否会觉得,明明看不到的地方为什么还要开发呢?直接糊弄一下不行么?
…
其实,这些并不是你想的那样简单。
上点年纪的会告诉你,这并不是浪费,反而是节省。
玩具的底层内部,虽然看不到,但是因为制作工艺,机器的缘故,只能做成这样。不可能去精准的分清哪些看得到,哪些看不到。看得到的精雕细琢,看不到的改变方案粗俗对待。这样反而是增加辨识成本,增加机器设计难度。还是干脆全部生产成统一的模块,简单高效。
然后卖给各种玩具厂商,他们自行组装使用,看得到看不到的,就那样吧。毕竟增加机器设计成本才是最亏的。
3d游戏建模,对于人物来说,如果要精准的对可见部分才绘画和设计,对不可见部分随便做。那么以后的更新成本将会更高。
毕竟突然换了一件衣服,那么可见不可见的地方就变了,难道要重新设计人物躯体么?把那些没绘画设计好的部分弄好,然后把后来看不到的地方再次涂抹掉?这些费时费力的事谁来做?
当然不是,正确的是做好人物模型后,随便去匹配各种衣服,而这时候衣服的设计就可以非常自由了,会极大的提高生产力和效率。
所有这些心得,放到我们测试平台的设计和开发中,大家就会懂了。
有些东西底层,是直接拿组件来调用的,看到看不到也不用额外增加修改成本。
比如:测试平台的 菜单组件。
菜单存在于很多页面的顶部或者左侧边栏。
如果每个页面都手写一堆菜单代码,那是不是想当面麻烦,浪费精力?
所以开发者会把菜单做成组件,其他页面直接简单调用即可。
但是这样就会形成一个现象: 不同页面的菜单有不同的不可见部分。
如果你打开f12,发现了这些,那就有可能发出和本文开头一样的疑问,这些部分明明不可见,为什么还要写好再隐藏呢?这不是种浪费么?
边栏推荐
- ES6 --- four powerful operators (?,? =,?.,?:)
- Record the transfer of domain names from Alibaba cloud service providers to Huawei cloud
- 选择的能力
- Shopify sellers: share some tips for social media marketing!
- The noise reduction effect is increased by more than 6 times! With the microphone inside the headset, this wireless noise reduction headset is unusual!
- 【面试:并发篇24:多线程:综合练习】顺序控制
- PE格式: 分析IatHook并实现
- cuda_ error_ out_ of_ Memory (out of memory)
- ONEFLOW V0.8.0 officially released
- [leetcode ladder] linked list · 876 find the middle node of the linked list
猜你喜欢

CNN structural design skills: taking into account speed accuracy and engineering implementation

【面试:并发篇23:多线程:join】join再理解

Pyqt5 use pyqtgraph to draw multiple y-value scatter plots

浅谈web性能优化(一)

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

【leetcode天梯】链表 · 876 查找链表中间结点
![[leetcode ladder] linked list · 021 merge two ordered linked lists](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[leetcode ladder] linked list · 021 merge two ordered linked lists

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

Share | intelligent fire emergency management platform solution (PDF attached)

PE format: analyze and implement IATHOOK
随机推荐
Sqlx library usage
Intel base instruction -- bnd
JMeter distributed pressure measurement
新版Maixhub部署(V831与K210)
[redis underlying parsing] linked list type
【Flink】FLink RocksDBListState 报错 You cannot add null to a ListState
cv图像翻转,EmguCV图像旋转「建议收藏」
Oracle RAC RMAN backup error ora-19501 ora-15081
[leetcode ladder] linked list · 021 merge two ordered linked lists
In depth understanding of seven specific ways to enhance code scalability
[ManageEngine] value brought by Siem to enterprises
NPM module removal_ [solved] after NPM uninstalls the module, the module is not removed from package.json [easy to understand]
Interface testing tool restlet client
大厂面试官:千万级数据量的表,如何进行快速查询?
字节一面:TCP 和 UDP 可以使用同一个端口吗?
Face and key point detection: yolo5face practice
GDB locates the main address of the program after strip
strcpy()
Why do independent sellers like to do e-mail marketing? The original conversion rate can be improved so much!
Six principles of C program design