当前位置:网站首页>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
边栏推荐
- Shell pass parameters
- Pointer for in-depth analysis (problem solution)
- 1、工程新建
- 数据分析——seaborn可视化(笔记自用)
- Performance analysis of user login TPS low and CPU full
- 2. GPIO related operations
- 3.1 detailed explanation of rtthread serial port device (V1)
- Pointer written test questions ~ approaching Dachang
- Yyds dry inventory what is test driven development
- 深入探究指针及指针类型
猜你喜欢

BUAA magpie nesting

Computer graduation project asp Net fitness management system VS development SQLSERVER database web structure c programming computer web page source code project

Mysql database operation

Recommended papers on remote sensing image super-resolution

Crazy, thousands of netizens are exploding the company's salary

给新人工程师组员的建议

2.1 rtthread pin device details

Performance test method of bank core business system

svg拖动点裁剪图片js特效

施努卡:视觉定位系统 视觉定位系统的工作原理
随机推荐
MPLS experiment
These are not very good
Distributed service framework dobbo
Recommended papers on remote sensing image super-resolution
Lua uses require to load the shared library successfully, but the return is Boolean (always true)
JS music online playback plug-in vsplayaudio js
[rust notes] 18 macro
Data analysis Seaborn visualization (for personal use)
Analyze menu analysis
SD卡報錯“error -110 whilst initialising SD card
Princeton University, Peking University & UIUC | offline reinforcement learning with realizability and single strategy concentration
Pytorch load data
【RISC-V】外部中断
Shell pass parameters
2.1 rtthread pin设备详解
jsscript
[slam] orb-slam3 parsing - track () (3)
mysqldump数据备份
The real machine cannot access the shooting range of the virtual machine, and the real machine cannot Ping the virtual machine
Research on cooperative control of industrial robots