当前位置:网站首页>[wechat applet] the hosting environment of the applet
[wechat applet] the hosting environment of the applet
2022-06-30 16:51:00 【Su Liang py】
Author's brief introduction : Su Liang ( Focus on web crawlers , Data analysis , On the way to learning the front end )
Blog home page : Su Liang .py The blog of
Series column : Basic course of applet development
Aphorisms : The sea is wide with fish , The sky is high and the birds are flying .
If you think the blogger's article is good , I hope you can support me for the third time in a row !!!
Follow the likes collection
List of articles
Daily recommendation
Recommend an artifact to everyone . Whether you are a student party or an office worker, you can use , The interview question bank is covered here , Brush questions online , Interviews with major manufacturers / Written test questions, etc . If you're still a student , The most important point is the simulated interview function , intelligence AI1v1 interview , Help you get to the big factory as soon as possible offer! Click the link to go directly to !=> Cattle from - Looking for work artifact
Host environment
One 、 What is the host environment ?
Host environment ( host environment) It refers to the dependent environment necessary for the program to run .
for example :Android Systems and iOS The system is two different host environments . Android version of wechat App No iOS Operating in the environment , therefore ,Android It is the host environment of Android Software , Software that leaves the host environment is meaningless !
Two 、 The host environment of the applet
On mobile phone , The hosting environment of the applet is our mobile wechat , Typically, applets can be implemented by leveraging the capabilities provided by the hosting environment , It can complete many functions that ordinary web pages can't : Wechat payment , Wechat code scanning , Wechat login, positioning, etc .
3、 ... and 、 What the applet hosting environment contains
1. Communication model
The subject of communication
The main body of communication in applet is rendering layer and logic layer , among :
- WXML Templates and WXSS Styles work in the render layer
- JS Scripts work at the logical level

Communication model of applet
The communication model in the applet is divided into two parts ( Are forwarded by wechat clients )
Communication between rendering layer and logic layer

Communication between logical layer and third-party server

2. Operating mechanism
The process of starting an applet
- Download the code package of the applet to the local
- analysis app.json Global profile
- perform app.js Applet entry file , call App() Create an instance of the applet
- Rendering applet home page
- Applet startup completed
Applet page rendering pass
- Load the of the parsing page .json The configuration file
- To load a page .wxml Templates and .wxss style
- Execute the .js file , call Page() Create page instances
- Page rendering complete
3. Components
Components in the hosting environment are also provided by , Developers can quickly build a beautiful page structure based on components . Officials divide the components of small programs into 9 Categories: , Namely :
- View container
- Basic content
- Form components
- Navigation components
- Media components
- map Map components
- canvas Canvas components
- Opening ability
- Accessibility
4.API
Small program official API It is divided into the following 3 Categories: :
Event monitoring API
characteristic : Withonstart , Used to monitor the trigger of some events
give an example :wx.onWindowResize(function callback)Listen for window size changesSync API
characteristic 1: WithSyncAt the end of the API It's all synchronous API
characteristic 2: Sync API The results of the implementation of , You can get directly through the return value of the function , An exception will be thrown if there is an error in execution :wx.setStorageSync("'key" , 'value')Write content to local storageasynchronous API
characteristic : Be similar to jQuery Medium$.ajax(options)function , Need to pass throughsuccess、fail、completeExample of result of receive call :wx.request()Initiate a network data request , adoptsuccessThe callback function receives data
More question banks and summary of knowledge points , Interview skills => Cattle from , Come and brush the questions with me !
边栏推荐
- [Verilog basics] octal and hexadecimal representation of decimal negative numbers
- Headhunter 50, 000, I'll go to VC
- simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
- RTP sending PS stream zero copy scheme
- 7 月 2 日邀你来TD Hero 线上发布会
- MC Instruction Decoder
- JS Es5 can also create constants?
- Carry two load balancing notes and find them in the future
- AVIC UAV technology innovation board is listed: the fist product with a market value of 38.5 billion is pterodactyl UAV
- [Verilog quick start of Niuke online question series] ~ bit splitting and operation
猜你喜欢

Go zero micro Service Practice Series (VIII. How to handle tens of thousands of order requests per second)

ArcMap operation series: 80 plane to latitude and longitude 84

Anaconda下安装Jupyter notebook

Mathematical modeling for war preparation 35 time series prediction model

【活动报名】探秘元宇宙,就差你了!7月2号我在深圳现场等你!
![[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)](/img/54/fd7541dae4aad7e4216bcaabbb146b.png)
[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)

19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project

Rong Lianyun launched rphone based on Tongxin UOS to create a new ecology of localization contact center

居家办公浅谈远程协助快速提效心得 | 社区征文

异常类_日志框架
随机推荐
附加:(还没写,别看~~~)CorsFilter过滤器;
牛客网:有多少个不同的二叉搜索树
KDD 2022 | how far are we from the general pre training recommendation model? Universal sequence representation learning model unisrec for recommender system
Yunhe enmo won the bid for Oracle maintenance project of Tianjin Binhai rural commercial bank in 2022-2023
2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
I 用c I 实现“栈”
Hundreds of lines of code to implement a JSON parser
Bidding announcement: Tianjin housing provident fund management center database all-in-one machine and database software project (budget: 6.45 million)
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!
halcon知识:区域专题【07】
Rong Lianyun launched rphone based on Tongxin UOS to create a new ecology of localization contact center
Hologres shared cluster helps Taobao subscribe to the extreme refined operation
On July 2, I invited you to TD Hero online conference
更多龙蜥自研特性!生产可用的 Anolis OS 8.6 正式发布
2022 Blue Bridge Cup group B - expense reimbursement - (linear dp| status DP)
Half year inventory of new consumption in 2022: the industry is cold, but these nine tracks still attract gold
Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
[time series database incluxdb] code example for configuring incluxdb+ data visualization and simple operation with C under Windows Environment
Undistorted resize using pil
Observation cloud reached in-depth cooperation with tdengine to optimize enterprise cloud experience
