Home WeChat Applet Mini Program Development How to view the stability guarantee of small programs from the perspective of a front-end programmer

How to view the stability guarantee of small programs from the perspective of a front-end programmer

Mar 04, 2020 pm 03:19 PM
Applets

When we talk about business stability, we usually mean what back-end engineers look at from an architectural perspective, such as current limiting and downgrading, traffic scheduling, business switching, capacity stress testing, etc., but monitoring is also the stability of the entire business. An indispensable part of the construction, such as the monitoring of business and front-end, to ensure that when problems occur, the root cause can be found as soon as possible. Today, we will take a look at how to monitor mini programs based on the scenario of mini programs.

The difference between mini programs and H5

Both mini programs and H5 are technical options in the mobile terminal scenario, so here is an introduction to the differences between mini programs and H5.

1. Differences in operating environment

The traditional H5 operating environment is a browser, including webview, in which the browser provides BOM objects such as window and document;

The logic layer and rendering layer of the applet are separated. The logic layer runs in JSCore and does not have a complete browser object, so it lacks related DOM API and BOM API.

2. Differences in development costs

The development of H5 involves the selection of development tools, front-end frameworks, module management tools, task management tools, UI libraries, and interfaces Calling tools and browser compatibility, etc.;

Development of small programs, small programs in designated environments will provide developer tools, APIs and standardized development standards. Since the mini program runs in a specified environment and the API is provided in a specified environment, there is no need to consider browser compatibility.

In H5 development, HTML/CSS commonly used on the front end has specified file standards in different mini programs. For example:

Use WXML/WXSS in WeChat mini programs;

Use AXML/ACSS in Alipay mini programs and DingTalk E applications;

Use Baidu smart mini programs Use SWAN/CSS;

......

The development specifications will have clear usage introductions in the designated official documents. The usage method is similar to the original H5 development, so get started. Development is relatively easy.

3. Differences in user experience

H5 pages need to be rendered in the browser, and there will be lags when complex business logic or rich page interactions occur;

Except for the small program being slightly slow for the first time, page switching and jumps are very smooth, close to Native.

Through the above-mentioned different introductions between mini programs and H5, we can find that the original monitoring of H5 pages cannot directly monitor mini programs; at the same time, due to the strong closed nature of mini programs, different mini programs have different standards. There are also slight differences. Mini programs such as WeChat mini programs, Alipay mini programs, and DingTalk E applications will also have some differences in the use of standard and open APIs, so the monitoring of mini programs will differ from the monitoring of web applications. different.

The current situation of small program monitoring

Currently, the monitoring of small programs is roughly divided into the following categories:

1. Data statistical analysis of small programs , to assist mini program operations

Related products: WeChat mini program assistant, Aladdin mini program statistics platform, etc.;

Features: Most of them provide corresponding data statistical analysis capabilities for WeChat mini programs, Analyzing user data related to mini programs from multiple dimensions is suitable for mini program operations, but it lacks monitoring of user experience and mini program performance.

2. Mini program error monitoring

Related products: FunDebug, etc.;

Features: Monitor the errors caused by mini programs to help developers discover and solve mini program errors , but there is a lack of monitoring of the global performance of the mini program, and slow requests and slow pages cannot be monitored.

3. Mini program performance monitoring

Related products: FrontJS, Tingyun mini program monitoring, etc.;

Features: Mainly provides performance-related data, including JS errors, network requests Response, etc. However, it only supports WeChat mini programs, and there is no way to correlate the performance of mini programs with the performance of background applications, making it impossible to form end-to-end monitoring.

Through the above analysis of existing mini program monitoring products, there are the following problems:

cannot support all mini program monitoring, and mainly supports WeChat mini programs;

Support Products that monitor multiple types of mini programs provide less data related to mini programs, mainly focusing on error monitoring;

There is no performance monitoring of background application services, and performance problems on mini programs cannot be traced back to background application code and Database cannot form end-to-end monitoring.

Based on the above situation, Alibaba Cloud ARMS front-end monitoring launches mini program monitoring, aiming to help quickly locate mini program problems end-to-end and improve the user experience of mini programs.

Capabilities provided by mini program monitoring

Alibaba Cloud ARMS front-end monitoring The mini program monitoring launched this time has the following characteristics:

1. Covers all types of programs that comply with standards and specifications Mini program

First explain the "standard and standardized mini program" mentioned here, which includes two layers: App and Page:

App is used to describe the overall program, including: onError event;

Page is used to describe each page, including: onShow, onHide, onUnload events.

The running environment of mini programs depends on the corresponding client. The DSL designs of various mini programs look similar, but there are still many differences in details, and there is a trend of differentiation. In this case, in order to better support the monitoring requirements of mini programs, Alibaba Cloud ARMS front-end monitoring provides the following mini program monitoring scenarios:

微信小程序
支付宝小程序
钉钉 E 应用
其他类别小程序
Copy after login

Due to the rapid development of mini programs, it is now impossible to target various mini programs All provide corresponding monitoring SDKs, so mini programs that do not belong to WeChat mini programs, Alipay mini programs, and DingTalk E applications can choose to access the scenarios of other categories of mini programs for monitoring, but they must meet the "standard specification mini programs" mentioned above. "Prerequisite, npm packages are also supported.

2. Complete performance monitoring indicators

Basic business indicators to help understand the usage of mini program applications:

Total application PV/UV

page Dimensional PV/UV

Indicators of each dimension of the mini program:

Mobile phone model

Operating system version

WeChat/Alipay and other corresponding APP versions

Network, etc.

JS error analysis:

JS error rate, error clustering, JS error stack and error location, etc.

API request tracking:

API request success rate, API request time consumption and API request link tracking

Custom event statistics

Support business custom event sum/avg statistics

3. The reporting method can be selected through configuration

Due to the different demands of business parties for monitoring, we not only support elegant silent data reporting, but also support customized reporting using open statistical capabilities. For details, please view the relevant documents of the mini program scenario in the front-end monitoring access overview of the official website:

https://help.aliyun.com/document_detail/106086.html

Summary

Mini programs are a direction heavily supported by major Internet companies. In the future, the number of applications of mini programs will increase, and the focus on user experience and improvement demands will also continue to increase. Alibaba Cloud The mini program monitoring provided by ARMS front-end monitoring can help customers monitor and discover quality problems in real time, providing a solid guarantee for the stable operation of the enterprise's mini programs.

The above is the detailed content of How to view the stability guarantee of small programs from the perspective of a front-end programmer. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Develop WeChat applet using Python Develop WeChat applet using Python Jun 17, 2023 pm 06:34 PM

With the popularity of mobile Internet technology and smartphones, WeChat has become an indispensable application in people's lives. WeChat mini programs allow people to directly use mini programs to solve some simple needs without downloading and installing applications. This article will introduce how to use Python to develop WeChat applet. 1. Preparation Before using Python to develop WeChat applet, you need to install the relevant Python library. It is recommended to use the two libraries wxpy and itchat here. wxpy is a WeChat machine

Can small programs use react? Can small programs use react? Dec 29, 2022 am 11:06 AM

Mini programs can use react. How to use it: 1. Implement a renderer based on "react-reconciler" and generate a DSL; 2. Create a mini program component to parse and render DSL; 3. Install npm and execute the developer Build npm in the tool; 4. Introduce the package into your own page, and then use the API to complete the development.

Implement card flipping effects in WeChat mini programs Implement card flipping effects in WeChat mini programs Nov 21, 2023 am 10:55 AM

Implementing card flipping effects in WeChat mini programs In WeChat mini programs, implementing card flipping effects is a common animation effect that can improve user experience and the attractiveness of interface interactions. The following will introduce in detail how to implement the special effect of card flipping in the WeChat applet and provide relevant code examples. First, you need to define two card elements in the page layout file of the mini program, one for displaying the front content and one for displaying the back content. The specific sample code is as follows: <!--index.wxml-->&l

How uniapp achieves rapid conversion between mini programs and H5 How uniapp achieves rapid conversion between mini programs and H5 Oct 20, 2023 pm 02:12 PM

How uniapp can achieve rapid conversion between mini programs and H5 requires specific code examples. In recent years, with the development of the mobile Internet and the popularity of smartphones, mini programs and H5 have become indispensable application forms. As a cross-platform development framework, uniapp can quickly realize the conversion between small programs and H5 based on a set of codes, greatly improving development efficiency. This article will introduce how uniapp can achieve rapid conversion between mini programs and H5, and give specific code examples. 1. Introduction to uniapp unia

Alipay launched the 'Chinese Character Picking-Rare Characters' mini program to collect and supplement the rare character library Alipay launched the 'Chinese Character Picking-Rare Characters' mini program to collect and supplement the rare character library Oct 31, 2023 pm 09:25 PM

According to news from this site on October 31, on May 27 this year, Ant Group announced the launch of the "Chinese Character Picking Project", and recently ushered in new progress: Alipay launched the "Chinese Character Picking-Uncommon Characters" mini program to collect collections from the society Rare characters supplement the rare character library and provide different input experiences for rare characters to help improve the rare character input method in Alipay. Currently, users can enter the "Uncommon Characters" applet by searching for keywords such as "Chinese character pick-up" and "rare characters". In the mini program, users can submit pictures of rare characters that have not been recognized and entered by the system. After confirmation, Alipay engineers will make additional entries into the font library. This website noticed that users can also experience the latest word-splitting input method in the mini program. This input method is designed for rare words with unclear pronunciation. User dismantling

How to operate mini program registration How to operate mini program registration Sep 13, 2023 pm 04:36 PM

Mini program registration operation steps: 1. Prepare copies of personal ID cards, corporate business licenses, legal person ID cards and other filing materials; 2. Log in to the mini program management background; 3. Enter the mini program settings page; 4. Select " "Basic Settings"; 5. Fill in the filing information; 6. Upload the filing materials; 7. Submit the filing application; 8. Wait for the review results. If the filing is not passed, make modifications based on the reasons and resubmit the filing application; 9. The follow-up operations for the filing are Can.

Tutorial on writing a simple chat program in Python Tutorial on writing a simple chat program in Python May 08, 2023 pm 06:37 PM

Implementation idea: Establishing the server side of thread, so as to process the various functions of the chat room. The establishment of the x02 client is much simpler than the server. The function of the client is only to send and receive messages, and to enter specific characters according to specific rules. To achieve the use of different functions, therefore, on the client side, you only need to use two threads, one is dedicated to receiving messages, and the other is dedicated to sending messages. As for why not use one, that is because, only

Introduction to WeChat applet development in Java language Introduction to WeChat applet development in Java language Jun 09, 2023 pm 10:40 PM

WeChat applet is a lightweight application that can be run on the WeChat platform. It does not require downloading and installation, which is convenient and fast. Java language, as a language widely used in enterprise-level application development, can also be used for the development of WeChat applets. In Java language, you can use the SpringBoot framework and third-party toolkits to develop WeChat applets. The following is a simple WeChat applet development process. To create a WeChat mini program, first, you need to register a mini program on the WeChat public platform. After successful registration, you can obtain

See all articles