当前位置:网站首页>Uncover the secret of the popular app. Why is it so black
Uncover the secret of the popular app. Why is it so black
2022-06-11 21:51:00 【It bond】
List of articles
Preface
Applet , Because of its convenient operation , And rich functions , It has been popularized in all fields of life , A lot of people know little about applets only about the state they can use , I don't know anything about the system , Today, let's uncover the secret of the small program .️ 1. What are applets ?

Applets are a new open capability , Developers can quickly develop a small program . Small programs can be easily obtained and spread in wechat , At the same time, it has an excellent use experience .
Applet , Many businesses are familiar with , Because of its convenient operation , And rich functions , It has been popularized in all fields of life . Whether it's takeout 、 Running errands 、 Small programs can be seen in both recruitment and rental housing .
Wechat applet is a lightweight application launched by wechat , It is a simple app, Does he have to download 、 Point and use 、 Run out of features , And because of the nature of small programs , It doesn't occupy memory , It can be used as an application tool for many segmentation scenarios , Therefore, it is deeply loved by users .
Advantages of wechat applet 
In fact, if you have played wechat apps , You'll find fluency and experience , The essence of a successful applet is hybrid( blend ) Of app Be situated between web app And native Native app Between , It has rich interfaces for calling various functions of the mobile phone , At the same time, it has flexibility , Cross platform , Maintenance costs are also fairly primitive app The lower , The development iteration speed is also relatively fast
Put a comparison chart , You can see the advantages of wechat applet

What small programs can help us solve ?
1. The search scope of the nearby applet is 5 km , That means it increases the radiation area of merchants to 5 km ,
5 All wechat users within km can become your consumers .
2. Small programs can achieve excellent publicity effect and market effect with low price . To achieve the same effect ,
The price of the applet is only a fraction of the offline publicity expenses .
3. Small programs are only for themselves , Let merchants no longer work for the platform . in 58, Public comment , For a little exposure and online market ,
Work hard on activities , To promote , But only the platform . The traffic attracted is recommended by the platform to other stores .
Small programs can increase the exposure of enterprises and merchants , Can open the vast online market , The most important thing is to let merchants really work for themselves .
4. Many e-commerce self built applets , Especially offline retail combined with new retail , This kind of experience is especially suitable for shopping ,
It is especially suitable for the re purchase of old users . In addition to pulling new and maintaining old users , And let traditional offline users provide additional services for their users .

️ 2. History of applet development

There are about 1/3 Of people have used applets , There should be more now . Let's briefly review the development of wechat applet ,
Wechat applet from 2016 After it was put forward in , In the same year 9 Start the internal test in the month , To 2017 year 1 month 9 The wechat applet was officially opened on the th ,
What we really accept is 2017 year 12 month 28 Japan ,
It was the time when wechat Games began to open , That is, everyone is familiar with the jump ,
At that time, wechat applet was widely recognized by everyone .
️ 3. Principle of small program
Applets are a new open capability , Developers can quickly develop a small program ,
Small programs can be quickly obtained and spread in wechat , At the same time, it has an excellent use experience .
So what is the principle of small program implementation ?

The first is its render layer , Is his Webviews,
The second is its logical layer , That is, we write business logic to realize login function and payment function ,
The third one can be understood as the original capability of wechat .
Webviews
Webviews Is mainly responsible for rendering , The underlying wechat provides more underlying capabilities .
We can see that wechat provides many rich native clients and its own capabilities to developers .
For example, the Internet , Initiate network request , Store and download , Storage includes reading and writing files 、 Audio and video reading and writing , Login is wechat version , Form a connection .
Components are the components we commonly use , Including hardware for developers , Including audio and video recording 、 camera , And take pictures. 、 Scanning code, etc .
Logic layer
You can see that this is passed through events and return data .
When the user has some operations on the interface , Will trigger some events , Give to native Webviews, And then to business logic .
Wechat's native capabilities
Anyone with experience as a small program developer knows , We wrote a book called WXM2 Things that are , Defined as Javascript,
Packaged with the business to form a small program .
️ 4. How to develop wechat apps
The difference between small program and common web development
The main development language for applets is JavaScript , The development of small programs has a lot of similarities with the development of ordinary web pages .
For front-end developers , The cost of moving from web development to applet development is not high , But there are still some differences between them .
Web development rendering thread and script thread are mutually exclusive , That's why a long run of scripts can cause pages to become unresponsive ,
And in applets , The two are separate , Running in different threads .
Web developers can use a variety of browsers exposed DOM API, Conduct DOM Select and operate .
And as mentioned above , The logic layer and rendering layer of the applet are separate , The logic layer runs in JSCore in ,
There is no complete browser object , So there is a lack of relevant DOM API and BOM API. This difference leads to some libraries that are very familiar with front-end development ,
for example jQuery、 Zepto etc. , It doesn't work in small programs . meanwhile JSCore The environment is the same as NodeJS The environment is also different ,
So some NPM The package is also not able to run in the applet .
Web developers need to face the environment is a variety of browsers ,PC The end needs to face IE、Chrome、QQ The browser etc. ,
On the mobile end, we have to face Safari、Chrome as well as iOS、Android All kinds of things in the system WebView .
The small program development process needs to face two big operating systems iOS and Android Wechat client of ,
And small program developer tools for assisting development , Small procedures in the three major operating environment is also different
The environment in which the applet runs 
When web developers develop web pages , Just use the browser , And with some auxiliary tools or editors .
The development of small programs is different , Need to apply for a small program account 、 Install the applet developer tool 、 Configuration items and so on .
Preparation for wechat applet development
- Register applet :
Register an applet account on the wechat public platform , Existing accounts can skip the registration process .- Sign in :
After logging in , On the menu “ Set up ”-“ Development and setup ” Get the development settings in AppID spare , And configure the server domain name 、 News push and so on .- Download wechat applet development tool :
Finally, small programs can only run on their special development tools 、 Release and other operations .- download HBuilder X development tool : I chose uniapp frame , You can use HBuilder X Development , Convenient and quick , Greatly increase development efficiency , Is worth to recommend . You can also use scaffolding , But I personally don't recommend it .5. Applet running configuration : stay HBuilder X Editor top menu “ Set up ”-“ Run configuration ”-“ Applet running configuration ”-“ Wechat developer tool path ”-“ Browse ”, Find the installation directory of wechat developer tools , selection “ WeChat developer tools .exe”.

️ 5. Learning resources for applets
Applet development documentation
The first thing to be clear is , Applet development is different from Python Development , The latter is a general open source programming language , So there will be a lot of people writing tutorials for it ; And the former , Is a development framework of Tencent's wechat products , It is a pure commercial technology . therefore , You can think about , Who wants others to learn how to develop small programs ? Of course, it is the official of Tencent . More and more people will use small programs to develop products , The more active the wechat ecosystem is . Therefore, the best entry-level learning resource for small programs is Tencent's official small program development document .
This document explains how to apply for an account and go online 、 The development guide and function experience are given Demo、 Contains the complete API Interface and configuration description , It is the most complete and authoritative introduction to wechat applet . For an existing JS and Web For those who have developed experience , It can be developed quickly . So I once said to the students , It is enough for you to read the official documents .

️ 6. The first wechat app
The first step in developing a small program , You need to have an app account , Through this account, you can manage your applet .
Follow this step , Start your little app tour !
Apply for an account number
Enter applet Registration page Fill in the information and submit the corresponding information according to the guidelines , You can have your own applet account .

In this small program management platform , You can manage the permissions of your applet , View data report , Release small program and other operations .
Sign in Applet background , We can do it on the menu “ Development ”-“ Development and setup ” See the applet AppID 了 .

Applet AppID It is equivalent to an ID card of the applet platform , You'll use it in many places later AppID ( Note that this is different from the service number or subscription number AppID). After you have an app account , We need a tool to develop small programs .
Stable version Stable Build (1.06.2206090)
Download the corresponding installation package according to your own operating system to install ,
Your first applet
New project selection applet project , Select the hard disk path where the code is stored , Fill in the applet's AppID, Give your project a nice name ,
Check “ Not using cloud services ” ( Be careful : You need to select an empty directory to create a project ),
Click New , You've got your first little program ,
Click compile on the top menu to preview your first widget in wechat developer tools .

Next, let's preview the effect of this small program .
Click the compile button on the tool , You can see the performance of this applet in the simulator interface on the left side of the tool , You can also click the preview button ,
Experience your first app on your mobile phone through wechat scanning .


边栏推荐
- LabVIEW Arduino电子称重系统(项目篇—1)
- 189. 轮转数组
- LeetCode-110-平衡二叉树
- 行而不辍,未来可期|云扩科技入选上海市专精特新企业
- LeetCode-322-零钱兑换
- Latex combat notes 3- macro package and control commands
- RPA super automation | nongnongji and cloud expansion accelerate financial intelligent operation
- Cdr2022 serial number coreldraw2022 green key
- 206.反转链表
- 科普 | NFT的类型有哪些(上)
猜你喜欢

The shortcomings of the "big model" and the strengths of the "knowledge map"

zypper命令使用示例

类和对象(1)

LeetCode-322-零钱兑换

LabVIEW Arduino电子称重系统(项目篇—1)

Leetcode-76- minimum covering substring

In the post epidemic era, how can enterprise CIOs improve enterprise production efficiency through distance

The network connection is normal, but Baidu web page can not be opened and displayed. You can't access this website solution

如何利用RPA机器人开启货代行业数字化转型第一步?

快速排序的优化
随机推荐
189. 轮转数组
LeetCode-129-求根节点到叶节点数字之和
Expérience 10 génération de courbes bezier - amélioration expérimentale - génération de courbes B - spline par point de contrôle
类和对象(4)
Codeforces Round #742 (Div. 2) F. One-Four Overload
Building a custom CNN model: identifying covid-19
《物联网开发实战》18 场景联动:智能电灯如何感知光线?(上)(学习笔记)
Carry and walk with you. Have you ever seen a "palm sized" weather station?
實驗10 Bezier曲線生成-實驗提高-控制點生成B樣條曲線
BZOJ3189 : [Coci2011] Slika
Classes and objects (2)
Redis basic data type (Zset) ordered collection
Binary search - Learning
Release of version 5.6 of rainbow, add multiple installation methods, and optimize the topology operation experience
C语言实现八种排序(2)
zypper命令使用示例
How to realize double speed playback and fast forward for restricted ckplayer players
Huawei equipment configuration h-vpn
Leetcode-43- string multiplication
领先企业推进智慧财务的同款效率工具,赶快了解一下?