当前位置:网站首页>模块与组件、模块化与组件化的理解分析
模块与组件、模块化与组件化的理解分析
2022-07-22 10:06:00 【五花肉三七分】
模块与组件、模块化与组件化的理解分析
一,模块
1.理解:向外提供特定功能的js程序, 一般就是一个js文件。
2.为什么要拆成模块:随着业务逻辑增加,代码越来越多且复杂。
3.作用:复用js, 简化js的编写, 提高js运行效率
二,模块化
当应用的js都以模块来编写的, 这个应用就是一个模块化的应用
三,组件
1.理解:用来实现局部功能效果的代码和资源的集合(html/css/js/image等等)
比如一个网页的头部部分,里面可以有css样式,img,js,html等,这放在一块就可以组成一个头部组件。
2.为什么要用组件: 一个界面的功能更复杂
3.作用:复用编码, 简化项目编码, 提高运行效率
四,组件化
当应用是以多组件的方式实现, 这个应用就是一个组件化的应用
结尾
希望能见到你们独到的见解
边栏推荐
- How maxscale handles the state of event after MariaDB master-slave switch -handle_ events
- 分享一下Typora工具
- ZABBIX realizes nail monitoring alarm
- warning: [mariadbmon] The current master server ‘srv-cls01-02‘ is no longer valid because it is in r
- Atr5179 single pole double throw switch chip replaces as179-92lf
- SQLite UDF/UDAF 的 PHP 实现
- js map与foreach区别
- Constructors and destructors of derived classes
- Explain the adapter technology in NLP from simple to deep
- spinning
猜你喜欢
zabbix怎样创建只监控某个端口状态的模板
作为初学者,我表示不想使用ESLint
派生類的構造函數和析構函數
oracle用一条sql查出哪些数据不在某个表里
Explain the adapter technology in NLP from simple to deep
It is found that the MariaDB database is 12 hours late, and the xxljob scheduled task scheduling is abnormal
如何不获取root权限使用第三方主题:MIUI篇
Doctoral application | Professor Ni Zhuoxian of the University of Hong Kong enrolls doctoral students with the full award in the direction of Internet of things and machine learning
Static member
Ci24r1 low-cost 2.4G wireless transceiver chip replaces xn297 compact si24r1
随机推荐
重复调用、消息,幂等性方案全整理
Doctoral application | Professor Ni Zhuoxian of the University of Hong Kong enrolls doctoral students with the full award in the direction of Internet of things and machine learning
结构体、枚举、联合博客浅习
Neo4j 示例:三国志人物关系图谱
索引为什么选择B+树
Shell counts all strings before the last occurrence of a string
Why does additional currency issue cause inflation? How to cause
静态成员
MySQL converts milliseconds into time string
El table method to get the index of the current row
安装mariadb 10.5.7(tar包安装)
相比技术与产品 倾听与意见才是Web3当下的首要任务
oracle怎样转义单引号
[take you to learn C, take you to fly] branch structure in Chapter 3 of C language programming (3rd Edition) of Zhejiang University Edition (exercise 3)
撞库、脱库和洗库
It is found that the MariaDB database is 12 hours late, and the xxljob scheduled task scheduling is abnormal
08.01 邻接矩阵
树和二叉树:树的概念
记一次优化我的个人博客
SVN服务端与客户端安装(汉化包)以及简单使用