- Home >> Technical Service >> Software
WeChat applet development method
1. What is a WeChat Mini Program
WeChat Mini Program, also known as Mini Program (Mini Program), is a lightweight application that does not need to be downloaded, is ubiquitous, available anywhere, available at any time, ready to use, and does not need to be uninstalled. The design concept is extremely simple. Users can scan the QR code or click the application to open and use it through WeChat, which is convenient and fast, and the user experience is very good.
In January 2017, Zhang Xiaolong announced the official launch of the mini-program. Once the mini-program was launched, it caused a sensation. It can achieve a variety of functions, among which the official account association function is particularly eye-catching. Through this function, users can achieve mutual access between Mini Programs and Official Accounts through menus or other methods. This not only simplifies the access process, but also optimizes the user experience and improves traffic conversion. It is precisely because of the ultra-high traffic conversion rate brought by the mini-programs that many well-known companies have launched mini-programs immediately, such as Maoyan Movies, which focus on service functions, and Toutiao, Yicai, etc., which focus on content production. The main applet. And in the following time, the number and types of small programs showed a trend of explosive growth.
The official positioning of applets is "light applications", that is, simple basic applications, which are not only easy to use, but also greatly reduce the development threshold. The development difficulty of small programs is much less than that of APP development, and it is suitable for the conversion of applications with simple functions or infrequent use. Media, enterprises, governments, other organizations, or individual developers can all apply for registration of Mini Programs. For developers, applets are undoubtedly a new opportunity and direction.
2. Features of WeChat Mini Programs
The rapid development and expansion of WeChat mini-programs is precisely because of its accurate positioning and many advantages in terms of user experience and product development. First of all, the WeChat applet does not need to be downloaded or installed, and users can use it immediately after opening and leaving. There is no need to download and install the APP, which saves traffic, saves mobile phone storage space, and saves user operation time. Secondly, because the front-end code of the mini program is stored on the WeChat server and stored in Tencent Cloud, there is no need to load it, it can be opened directly, and the response speed is fast. Thirdly, the functions are abundant and the development cost is low. It can be developed based on the system functions of mobile phones, such as gravity sensing, audio and video recording, GPS positioning, etc., and can develop richer usage scenarios. For the same function, it is estimated that it will cost hundreds of thousands or even hundreds of thousands of yuan to make an app, but it can usually be completed with a few thousand yuan to develop a small program. Program maintenance is also relatively simple and convenient. Furthermore, there are many portals open to the mini-program. In addition to common portals such as scanning codes, sending friends, searching, and nearby, it can also be associated with official accounts, embed articles in groups, and link to official account menus. In other words, promotion is easier, simpler and more cost-effective. Finally, high security and good user experience. The applet needs to be reviewed before it can be released. The communication uses https access, SSL encrypted communication, and the style code is encapsulated in the WeChat applet, so the security is relatively high. At the same time, from the perspective of user experience, compared with various APPs that vary widely, the interface and operation methods of WeChat applets will be more unified, which greatly reduces the difficulty of use for users.
Compared with official accounts, mini programs have many advantages. The official account, especially the subscription account, is placed on the secondary interface. The operation delay is large and the opening is relatively slow, while the small program opens quickly and is close to the original APP. In this regard, the experience is far better than the official account; the official account cannot update the news in real time , and the applet can update the content from time to time, and it will be automatically refreshed every time it is opened; the official account has fewer interfaces, while the applet currently has 56 interfaces. From a positioning and technical point of view, there is also a big difference between the two. The official account is positioned on marketing and information transmission, while the mini program is mainly positioned on products and services; the official account is developed based on HTML5, while the mini program is based on WeChat’s own development environment and development language.
Compared with APP, applets are also very different. First of all, the user groups are different. The APP is for all smartphone users, and the Mini Program is for all WeChat users. Second, development costs are different. APP development costs are high and the cycle is slow, while the development cost of small programs is low, a set of codes can be used by multiple terminals, and the development cycle is fast. Again, the download and installation methods are different. APP requires users to download and install from the app store, while mini programs can be easily obtained through WeChat scanning, sharing, searching and other methods. Furthermore, the product release method is different. APPs need to be submitted for review to N app stores, while mini programs only need to be submitted for review to the WeChat public platform. Furthermore, the memory usage is different. APPs always occupy memory space, while small programs occupy negligible memory. Finally, the message push method is different. APPs allow messages to be pushed to mobile phones, while mini programs are not allowed to actively send advertisements to users.
3. Application and Registration Process of WeChat Mini Programs
Individuals, media, enterprises, governments and other organizations can register to develop Mini Programs and become the registered subjects of Mini Programs. There are two ways to apply for the Mini Program:
1. Registration Method 1 of WeChat Mini Program
Applicable to those who have never registered a WeChat service account, subscription account, or mini program.
First prepare an unregistered WeChat (service account, subscription account, applet) mailbox, if not, please go to the relevant mailbox website to apply for one. Log in to the WeChat public platform (http://mp.weixin.qq.com/), click the "Register Now" button in the upper right corner to start registration. Select the type that needs to be registered on the page, and click "Mini Program" to enter the mini program registration page. Fill in the email address, set the login password, fill in the verification code on the page, check the "Agree Agreement" option, and then click the "Register" button, WeChat will send an email to the email, enter the email for verification, and click Verify in the email link to activate the account. Next, you need to register the user's basic information and confirm the type of the Mini Program registration subject. It should be noted that the verification methods are different for different subject types.
1) Mini Programs registered as individuals. This method is applicable to the case where the subject type of the mini program is selected as an individual. It is necessary to fill in the personal profile information. After completing the identity verification, the registration is successful.
2) Mini programs registered as organizations. Consistent with the mini-program process of registering as an individual, you also need to provide your own personal information. It should be noted that the company name must be exactly the same as the name on the business license, otherwise the Mini Program will not pass the review and all information will be filled in again. There are two options for registration: payment to a public account and WeChat authentication. Relatively speaking, the WeChat authentication method is faster and more convenient, and is recommended as the first choice.
Finally, register the administrator information. It should be noted that once the main information of the WeChat Mini Program is submitted, it cannot be modified.
2. Registration Method 2 of WeChat Mini Program
Applicable to official account quick access to mini programs, you can quickly register mini programs with the original official account qualification. There is no need to resubmit the main materials, and there is no need to pay a certification fee of 300 yuan.
First, log in to the WeChat public platform (https://mp.weixin.qq.com/), enter the existing official account, enter the mini program management page, and check "Quickly register and authenticate the mini program". Then, with the help of the official account qualification, bind the administrator of the mini program to complete the registration of the mini program.
4. The file structure of the WeChat applet
The WeChat Mini Program consists of an app that describes the overall program (global, their content affects all pages) and multiple pages that describe their respective pages. The typical directory structure of WeChat applets is very simple, generally under the project directory, including 2 directories, namely pages directory and utils directory, and 3 application files, app.js, app.json, app.wxss. Each display page of the applet is stored under the pages directory, and each page has a directory, which generally contains 2-4 files, namely .js, .wxml, .wxss, and .json. The pages directory stores the constituent files of the two pages, index and logs. Each page is a directory, and the directory name is the unique page name.
The main part of a small program consists of three files: app.js, app.json, and app.wxss, which must be placed in the root directory of the project, and the names of the three files are fixed and cannot be modified at will. The app.js file defines the script code of the applet, declares the global variables of the applet, monitors and processes the lifecycle functions. This file will be executed first, and can do some unified processing on the entire program; the app.json file configures the applet globally, setting the page access path, interface performance, network timeout, bottom tab, etc. of the current applet. It is used to configure the applet as a whole. The configuration in this file can be overwritten by the same *.json configuration on other pages; app.wxss is the public style sheet of the entire applet. It is the overall control of the style of the applet, and the style in this file will also be overwritten by the same style in *.wxss in other pages.
An applet page consists of four files, namely .js, .wxml, .wxss, and .json. *.js files are used to write logic functions in applets; *.wxml is used to edit the structure of pages in applets, just like html in web pages; *.wxss is used to edit page styles, just like css Similarly, the syntax is also consistent with css; *.json is used to make some specific configurations on the page, such as modifying the page title, or using some functions encapsulated by WeChat. Note that these four files need to be placed in the same folder, and the file name must be consistent with the folder name. Take the index page as an example, index.wxml is used to describe the structure of the page, index.wxss is used to describe the style of the page, index.js is used to describe the logic and functions of the page, index.json It is used to do some specific configuration on the current page.
Summarize
Everyone must be aware of how helpful WeChat Mini Programs are to traditional industries. In the era of mobile Internet, everyone's communication is basically based on WeChat, involving all aspects of daily life and work. Based on its accurate positioning and numerous advantages, the WeChat mini-program has grown in full swing, and is an essential way for businesses and individuals to develop in the mobile Internet era.
The above are the details of WeChat Mini Program development technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have software and hardware function development needs for smart electronic products, you can rest assured to entrust them to us. We have rich experience in customized development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad, including MCU, voice IC, Bluetooth IC and modules, wifi modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth wifi development, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS solutions, the development of Bluetooth audio, the development of children's toys, and the development of electronic education products.
- TOP