当前位置:网站首页>What processes are needed to build a wechat applet from scratch?
What processes are needed to build a wechat applet from scratch?
2022-06-25 16:19:00 【、Packager】
Build a wechat applet from scratch , What processes are needed ?
There are several modes for wechat applet , One is the cloud service mode , One is not to use cloud service mode , What is the difference between the two ?
Official explanation : Wechat cloud development is a professional applet development service launched by wechat team and Tencent cloud .
Developers can use cloud development to quickly develop small programs 、 Little games 、 The official account page, etc , And the original ability to open wechat .
Developers don't have to build servers , You can directly use the API Business development .
Personal understanding : Cloud service mode , That is, the background logic and data are hosted on Tencent server , Non cloud service mode , That is, the background logic is on the local server , The difference between the two lies in buying / Rent a server to deploy the background interface service , Or use the services officially provided by the applet , Of course , Use the official , Naturally, there are some security benefits , If you deploy it on the server , You need to perform authentication at the interface level 、 check 、 Encryption and other measures . What about here? , Let's take personal deployment as an example .
Okay , I don't say much nonsense , On dry , All of the following are not intended to be detailed , Just for the process steps built , There is something unclear that can QQ Click here to communicate with me , Or scan the wechat QR code below , Communicate with me !
Construction process
Build wechat apps , We need to prepare the following :
First , On the wechat open platform , Register to apply for a wechat applet , Click here to go to
After registration , Login account , On page : Development 》 Development management 》 Development and setup Get the appid
Then download the developer tool of wechat applet , The download location is on the page : Development 》 development tool 》 Developer tools Download
Wechat developer tools , The main components used are those officially provided , You can also draw your own interface styles , See the official documents for specific development documents ,https://developers.weixin.qq.com/miniprogram/dev/framework, Practical and regular web development , Applet js The grammar is the same , Just say something similar vue The development mode of the framework , Data binding , Life cycle triggering, etc , The interface style is almost the same as css, The difference is that wechat applets have their own interface units :rpx etc. , It is also a common unit of wechat applet , What's better than a regular front end is , The screen width of wechat applet is constant :750rpx, This helps front-end developers cope with different screens , The same proportion is calculated and divided , Greatly improve the interface compatibility , It also provides a wealth of components , It reduces the developer's effort to redraw some components such as selectors
New applet project , After opening the wechat applet developer tool , New projects , Here you need to enter a appid, Here, fill in the wechat applet we registered above , Acquired Appid Just fill in , Choose not to use cloud services
This completes the initialization status of the applet , Initialization is officially provided demo Code , In this way, you can develop the interface on this basis , I won't go into details about how to develop small programs , If you are interested, you can look at the document and write demo Practice hands , This involves a key point , That is, front-end and back-end delivery , At present, the applet is the front end , What about the back end ?
There are many back ends , See what language you are familiar with , Just use what language to do the back-end interface , Most of the previous websites were not separated from the front and back , Now almost all of them are separated from the front end and the back end , What's the difference between separation and non separation ? If not separated , Interface rendering is done on the server side , The separation is done on the client side , Compared with , Front and rear end separation is a better choice , In this way, the front and rear end are developed by division of labor , More efficient , Reduce maintenance costs , A clearer division of labor , The back end focuses on logic , The front-end pays attention to interface rendering and logic processing , The wechat applet is also a complete front and back-end separation framework , Far away , Far away , Come back and continue , In the back end , I usually use Java、Pyhton、PHP Choose one of the three languages , Currently used Java、Python A little more , It depends on personal preferences and the stability requirements of the system , The back-end logic will not be demonstrated here , One thing to note is , Wechat applets require that the backend must support https Of ,https You need to SSL A security certificate , This certificate , Generally, you can get free when you buy a domain name , It is recommended to use Alibaba cloud or Tencent cloud , Of course , Just choose what you like , Take Alibaba cloud as an example :
Apply for a free certificate and download it directly , As for what type of certificate to download, it depends on the back-end language you use , What is a frame , After downloading, it is placed on the corresponding back-end framework for configuration , Here we use java Linguistic spring boot For example , Put the downloaded Certificate in resources File directory , And on the configuration file ssl Related parameters
When the configuration is complete , Package and deploy the interface to the ECS , Here the server is an application server , It depends on you / What server did you rent , Build and deploy the corresponding back-end language framework , here ssl After deployment , To put https The interface address of is configured in the secure domain name of the wechat applet , In this way, wechat applet can be delivered
Again , In the background interface of wechat applet : Development 》 Development management 》 Development and setup 》 request Legitimate domain name To configure
After configuration , Submit the code version in wechat developer tool , Then submit the experience version to the wechat applet team for review in the background .
This is the complete process , The article doesn't mention code related information , Because it's thin , It is too much and too troublesome to write , This is just an introduction to the overall process , There is something unclear that can QQ Click here to communicate with me , Or contact wechat :walei5201314.
边栏推荐
- Blue Bridge Cup - practice system login
- Consumer and producer cases of inter thread synchronization (condition variable)
- Helsinki traffic safety improvement project deploys velodyne lidar Intelligent Infrastructure Solution
- Load local cifar10 dataset
- Time wheel and implementation analysis of time wheel in go zero
- 深度学习 pytorch cifar10数据集训练「建议收藏」
- Mixed density network (MDN) for multiple regression explanation and code example
- Summary of 2022 spring moves of ordinary people (Alibaba and Tencent offer)
- Uniapp converts graphic verification codes in the form of file streams into images
- Introduction to MgO 256gb NAND flash chip
猜你喜欢
李飞飞团队将ViT用在机器人身上,规划推理最高提速512倍,还cue了何恺明的MAE
error Parsing error: Unexpected reserved word ‘await‘.
Describe your understanding of the evolution process and internal structure of the method area
Lecun predicts AgI: big model and reinforcement learning are both ramps! My "world model" is the new way
Startup and shutdown of appium service
Power representation in go language
AutoK3s v0.5.0 发布 延续简约和友好
Popular cross domain
Sleep formula: how to cure bad sleep?
Consumer and producer cases of inter thread synchronization (condition variable)
随机推荐
XML usage and parsing of data storage and transmission files
Dino: Detr with improved detecting anchor boxes for end to end object detection
sql优化的几种方式
What are some tricks that novice programmers don't know?
Leetcode topic [array]-34- find the first and last positions of elements in a sorted array
Differences between = = and = = = in JS (detailed explanation)
This article will help you understand the common concepts, advantages and disadvantages of JWT
Webgl and webgpu comparison [4] - uniform
地理位置数据存储方案——Redis GEO
一文带你搞懂 JWT 常见概念 & 优缺点
Linux-MySQL数据库之高级SQL 语句一
Introduction to MgO 256gb NAND flash chip
leetcode-8. String to integer (ATOI)
Swift responsive programming
What is session? How is it different from cookies?
Read the configuration, explain the principle and read the interview questions. I can only help you here...
Continuously improve the overall performance of adaoracle Oracle Oracle
DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection翻译
Dart syntax
基于神经标签搜索,中科院&微软亚研零样本多语言抽取式摘要入选ACL 2022