Home  >  Article  >  WeChat Applet  >  The difference between mini programs and H5

The difference between mini programs and H5

hzc
hzcforward
2020-06-16 10:09:303757browse

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:juejin.cn. If there is any infringement, please contact admin@php.cn delete