当前位置:网站首页>3分钟带你了解微信小程序开发
3分钟带你了解微信小程序开发
2022-07-06 03:36:00 【极客江南】
什么是微信小程序
微信小程序是腾讯2017年1月9日正式上线的一种基于微信的无需安装的应用程序
什么是基于微信?
简单粗暴的理解就是运行在微信中的应用程序, 如果没有安装微信则不能运行
什么是无需安装?
无需安装只是宣传噱头, 本质上小程序也是需要下载安装的. 只不过微信官方对小程序安装的大小有严格的限制(单包2M/总包20M), 所以下载安装非常快, 以至于给用户一种无需安装的错觉
小程序和网页及原生APP对比
- 网页
运行环境: 浏览器(有浏览器就能运行)
优点: 开发成本低(一套代码即可运行在各个平台), 传播速度快(输入网页地址即可使用)
缺点: 用户体验差(交互体验不如原生), 系统契合度差(很多系统功能无法使用)
- 原生APP
运行环境:iOS/Android/HarmonyOS
优点:用户体验好, 系统契合度高(系统开放的功能都可以使用)
缺点:开发成本高(每个平台都需要一套单独代码), 传播速度慢(下载安装繁琐)
- 小程序 (介于网页和原生APP之间)
运行环境: 微信
优点: 用户体验好, 开发成本低, 传播速度快(扫码/聊天分享/微信搜索)
缺点: 系统契合度不如原生(只能使用系统和微信都开放的功能)
例如: 系统开放了拍照功能, 微信也开放了这个功能, 那么开发者就可以使用
例如: 系统开放了读取通讯录功能, 但微信没有开放, 那么开发者就不能使用
但是大家也不用担心, 微信开放的功能完全能满足市面上绝大多数应用的需求
总结
小程序是一种介于网页和原生APP之间的应用程序
它既拥有原生APP良好的用户体验和良好的系统契合度, 又拥有网页较低的开发成本和极佳的传播速度
唯一值得注意的两点是:
小程序为了达到无感安装的效果有体积限制, 所以过于复杂的程序不太适合做小程序
小程序有一套自己的审核机制, 开发完的小程序必须经过腾讯审核之后才能上架
小程序开发准备
知识储备
必备:HTML/CSS/JavaScript(语法部分)
小程序中没有浏览器和文档(Document)对象的概念, 所以不需要BOM/DOM相关知识
可选:TypeScript/SASS/LESS/NodeJS
小程序支持TypeScript/SASS/LESS/NodeJS, 但是不会一样不影响我们开发
事半功倍: Vue/React
小程序中也有模块化/组件化/生命周期/指令等概念, 如果你学习过Vue或React, 会给你一种见到初恋的感觉
账号准备
由于微信开发者工具需要登录后才能使用, 所以需要注册一个小程序账号
账号注册指南:https://developers.weixin.qq.com/miniprogram/introduction/
账号注册地址:https://mp.weixin.qq.com/wxopen/waregister?action=step1
个人开发者: 注册好账号后拿到AppId即可开干
团队开发者: 注册好账号之后还需要添加其它开发人员
开发者工具准备
下载地址:https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html
开发工具介绍: https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html
相关文档/Demo
开发指南: https://developers.weixin.qq.com/ebook?
action=get_post_info&docid=0008aeea9a8978ab0086a685851c0a
开发文档:https://developers.weixin.qq.com/miniprogram/dev/framework/
Demo案例: https://github.com/wechat-miniprogram/miniprogram-demo
边栏推荐
- Python implementation of maddpg - (1) openai maddpg environment configuration
- StrError & PERROR use yyds dry inventory
- SWC介绍
- Data analysis Seaborn visualization (for personal use)
- 遥感图像超分辨重建综述
- How to choose PLC and MCU?
- 3.2 detailed explanation of rtthread serial port device (V2)
- SAP ALV cell level set color
- BUAA喜鹊筑巢
- An article about liquid template engine
猜你喜欢

SAP ALV颜色代码对应颜色(整理)

RT-Thread--Lwip之FTP(2)

SAP ALV cell level set color

svg拖动点裁剪图片js特效

The real machine cannot access the shooting range of the virtual machine, and the real machine cannot Ping the virtual machine

Python implementation of maddpg - (1) openai maddpg environment configuration

pytorch加载数据

Explore pointers and pointer types in depth

1.16 - 校验码

Map sorts according to the key value (ascending plus descending)
随机推荐
JS音乐在线播放插件vsPlayAudio.js
Record the process of reverse task manager
How to choose PLC and MCU?
Pytorch基础——(1)张量(tensor)的初始化
BUAA计算器(表达式计算-表达式树实现)
February 14, 2022 Daily: Google long article summarizes the experience of building four generations of TPU
SAP ALV颜色代码对应颜色(整理)
【SLAM】lidar-camera外参标定(港大MarsLab)无需二维码标定板
施努卡:3d视觉检测应用行业 机器视觉3d检测
[slam] orb-slam3 parsing - track () (3)
Performance analysis of user login TPS low and CPU full
下一个行业风口:NFT 数字藏品,是机遇还是泡沫?
多项目编程极简用例
[padding] an error is reported in the prediction after loading the model weight attributeerror: 'model' object has no attribute '_ place‘
Four logs of MySQL server layer
Teach you to build your own simple BP neural network with pytoch (take iris data set as an example)
适合程序员学习的国外网站推荐
Python implementation of maddpg - (1) openai maddpg environment configuration
Recommended foreign websites for programmers to learn
Cubemx transplantation punctual atom LCD display routine