当前位置:网站首页>3分钟带你了解微信小程序开发
3分钟带你了解微信小程序开发
2022-07-28 09:13:00 【segegefe】
什么是微信小程序
微信小程序是腾讯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/waregisteraction=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
边栏推荐
- Pytorch deep learning practice lesson 9 multi classification problems (handwritten numeral MNIST)
- 2022 examination question bank and simulation examination of crane driver (limited to bridge crane)
- 就这么一个简单的校验,80%的程序员却做不到,更不理解!
- Talk to the father of MySQL: code completion at one time is a good programmer
- 数据库高级学习笔记--存储结构
- LeetCode_ 406_ Rebuild the queue based on height
- 脉冲风采|Committer 专访——腾讯工程师张大伟喊你吃“螃蟹”啦
- 376. Swing sequence [greedy, dynamic planning -----]
- 21天学习挑战赛-《Autosar从入门到精通-实战篇》
- How view works
猜你喜欢

ShardingSphere之分库分表概念介绍(二)
![ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器](/img/90/40869d7c03f09010beb989af07e2f0.png)
ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器

就这么一个简单的校验,80%的程序员却做不到,更不理解!

软件测试与质量学习笔记1---黑盒测试
C# 窗体应用使用对象绑定 DataGridView 数据绑定

QT basic hand training applet - simple calculator design (with source code, analysis)
![Rgb-t tracking: [multimodal fusion] visible thermal UAV tracking: a large scale benchmark and new baseline](/img/9b/b8b1148406e8e521f12ddd5c12bf89.png)
Rgb-t tracking: [multimodal fusion] visible thermal UAV tracking: a large scale benchmark and new baseline

Introduction to shardingsphere's concept of sub database and sub table (2)

Final keyword and enumeration type

Opencv4.60 installation and configuration
随机推荐
19c sysaux tablespace sqlobj$plan table is too large. How to clean it up
Introduction to SD card (based on spec3.0)
Scalable search bar, imitating Huawei application market
Final keyword and enumeration type
[gossip] the development of programmers needs two abilities most
go语言切片Slice和数组Array对比panic runtime error index out of range问题解决
Window source code analysis (IV): window deletion mechanism
2.9.5 ext JS object type processing and convenient methods
[Download] several tools for brute force cracking and dictionary generation are recommended
数据库高级技术学习笔记1--Oracle部署和PL/SQL综述
Which system table is the keyword of SQL Server in?
Technology sharing | quick intercom integrated dispatching system
数据库高级学习笔记--系统包
[swintransformer source code reading II] window attention and shifted window attention
376. Swing sequence [greedy, dynamic planning -----]
[C language] detailed explanation sequence table (seqlist)
SQL server, MySQL master-slave construction, EF core read-write separation code implementation
Retrofit源码解析
51 single chip microcomputer storage: EEPROM (I2C)
咸鱼ESP32实例—MQTT 点亮LED