search
HomeWeChat AppletMini Program DevelopmentThe difference between mini programs and H5

The difference between mini programs and H5

Jun 16, 2020 am 10:09 AM
Applets

Recently, the end technologies of the past two years have tended to favor small programs. So what is the difference between mini programs and traditional H5 web pages? Let’s do a comparison below:

Differences in running environment

Mini program: The running environment of the mini program is a built-in parser based on a completely reconstructed browser kernel, which is targeted. Optimization, in conjunction with self-defined development language standards, improves the performance of small programs. The window object and document object commonly used in browsers cannot be used in the script, thus avoiding DOM memory leaks from the source. H5: It is impossible to control developers' operations on the DOM, and memory leaks are prone to occur. There is also the problem of slow page loading in SPA single-page applications.

Differences in development costs

Mini programs: Mini programs standardize development standards and are much simpler. The common HTML and CSS on the front end have been replaced by WeChat's customized WXML and WXSS. This avoids the variety of frameworks and makes it more difficult for project personnel to get started and maintain. Alipay mini programs may be AXML, ACSS; Toutiao mini programs may be TTML, TTSS, etc. H5: Involves development tools (vscode, Atom, etc.), front-end frameworks (Angular, react, etc.), module management tools (Webpack, Browserify, etc.), task management tools (Grunt, Gulp, etc.), as well as UI library selection and interface calling tools (ajax, Fetch Api, etc.), browser compatibility.

Differences in obtaining system-level permissions

Mini program: More system permissions, such as network communication status, data caching capabilities, etc. These system-level permissions can be seamlessly connected with mini programs. H5: Obtaining system permissions is where most H5 is criticized. This is also the reason why most H5 application scenarios are positioned with simple business logic and single functions.

Differences in running fluency

Mini Program: Mini program, its code runs directly on the APP, through browser dual-thread UI rendering and business logic separation and other technologies, therefore, in WeChat Only when using mini programs in the app, it will be much smoother than H5. In addition to the loading time of a few seconds when opening for the first time, the switching and jumping experience of each page of the mini program is already comparable to that of the native app, with the same silky smooth effect. H5: It actually opens a web page, and the web page needs to be rendered in the browser. Therefore, the loading process will give people an obvious "stuck" feeling, especially when facing complex business logic or rich page interactions.

Different operation and maintenance methods

Mini program: The mini program supports grayscale release and AB testing. In the event of an abnormality, the operation can be rolled back on the management interface in real time. H5: If an abnormal problem occurs in H5, operation and maintenance personnel need to redeploy the rollback system in the production environment. System deployment in the production environment is risky.

Different user experience

Mini programs: Due to the relationship between WeChat, mini programs have become popular in recent years. User acceptance and recognition are very high, and the experience of mini programs is indeed better than h5 It's much better. Mini programs can be cached when downloaded locally, so the user experience is smoother. More importantly, users' collection of mini programs and other operations will be more natural and the experience will be better. They don't have to worry about the difficulty of finding the collected items. . H5: H5 traditionally feels like loading is slow, and once you click to exit H5, it is often difficult to find the corresponding entrance, especially since the link depth is relatively deep. After users keep clicking in it, it is difficult for users to find themselves once they exit. Something to focus on.

The mini program is parasitic in the host App and can be used immediately. It does not take a long time to download and install the application, so the mini program is now very popular among users.

In addition to putting mini programs on platforms such as WeChat, Alipay, Baidu, Toutiao, etc., are there any other SDKs or technologies that can enable our own applications to support mini programs?

The answer is yes, that is Fantai applet development platform.

Fantay Mini Program Development Platform was originally planned to help the financial industry upgrade and optimize applications to improve user experience. Later, Fantai split and optimized the mini program platform, and now supports the privatized deployment of the mini program management platform, and also launched iOS and Android mini program SDKs. The official website has even launched a one-click deployment solution, which allows for a faster deployment experience on your own server.

So, using Fantai Mini Program can make more mobile applications support mini programs. Hurry up and replace the H5 in the application with mini programs!

Recommended tutorial: "WeChat Mini Program"

The above is the detailed content of The difference between mini programs and H5. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:掘金社区. If there is any infringement, please contact admin@php.cn delete

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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),