当前位置:网站首页>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
边栏推荐
- SAP ALV color code corresponding color (finishing)
- Crazy, thousands of netizens are exploding the company's salary
- 3.2 detailed explanation of rtthread serial port device (V2)
- Eight super classic pointer interview questions (3000 words in detail)
- 1. New project
- February 14, 2022 Daily: Google long article summarizes the experience of building four generations of TPU
- Handwriting database client
- Quartz misfire missed and compensated execution
- Restful style
- 深度解析指针与数组笔试题
猜你喜欢

Idea push rejected solution

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower

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

Overview of OCR character recognition methods

IPv6 comprehensive experiment

2.2 STM32 GPIO操作

C language circular statement

Eight super classic pointer interview questions (3000 words in detail)

1.16 - check code

Force buckle 1189 Maximum number of "balloons"
随机推荐
Some problem records of AGP gradle
1. New project
2.2 fonctionnement stm32 GPIO
深入刨析的指针(题解)
Tidb ecological tools (backup, migration, import / export) collation
BUAA calculator (expression calculation - expression tree implementation)
施努卡:什么是视觉定位系统 视觉系统如何定位
An article about liquid template engine
Exness foreign exchange: the governor of the Bank of Canada said that the interest rate hike would be more moderate, and the United States and Canada fell slightly to maintain range volatility
Quartz misfire missed and compensated execution
Performance test method of bank core business system
Shell 传递参数
SWC介绍
Mysql database operation
2.2 STM32 GPIO操作
Pytorch基础——(2)张量(tensor)的数学运算
February 14, 2022 Daily: Google long article summarizes the experience of building four generations of TPU
Getting started with applet cloud development - getting user search content
JS音乐在线播放插件vsPlayAudio.js
MySQL Server层四个日志