Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Is WeChat Mini Programs html5?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about whether WeChat Mini Programs is html5 or not. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

WeChat Mini Programs is not html5, it is based on Wechat's independent development model, can save people's development costs and development cycle. The differences between WeChat Mini Programs and html5: 1, different running environment; 2, different development costs; 3, different access to system-level permissions; 4. Different fluency of applications in the production environment.

The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.

HTML is called Hyper Text Markup Language in English, that is, Hypertext markup language. HTML5 is a technology, and the shell attached to it is a browser, while Mini Program is an application based on Wechat that can be used without download or installation.

Below, from the perspective of "front-end development", WeChat Mini Programs and HTML5 are also different in many aspects. Generally speaking, there are four differences in the following aspects!

First, the difference in operating environment

Traditional HTML5 runs on browsers, including webview, while WeChat Mini Programs's running environment is not a complete browser. Note that what I write here is "incomplete browser" for the following reasons:

All (not all) of the HTML5-related technologies will be used in the development of Mini Program.

The final release of Mini Program needs Wechat review. Wechat can update Mini Program into its own software without updating its own software, which is reminiscent of the ReactNative framework. And some developers have found the use of react and NodeWebkit libraries in the source code of WeChat Mini Programs's development tools.

The official documentation highlights that window and document objects commonly used in browsers cannot be used within scripts (based on this, libraries like zepto/jQuery that manipulate dom are completely abandoned).

So I think that the running environment of Mini Program is likely to be a built-in parser for Wechat development team based on complete refactoring of the browser kernel, which is specially optimized for Mini Program and complies with its own defined development language standards. improves the performance of Mini Program.

However, as Wechat provides developers with development tools, and the development tools are also built-in programming, debugging, development environment, and released in one, we no longer need to discuss its final running environment. Just follow the official documentation to develop. And from the move that the Wechat team provides developers with development tools, it reminds me of the X-CODE development tools provided by Apple to developers. We can imagine the "ambition" of Wechat.

Second, the difference of development cost

Here I ask the question, what do we need to consider when we are faced with a HTML5web development requirement?

Development tools (vscode, sublimtext, Atom, etc.) aside, to the front-end framework (Angular, react, vue, backbone, etc.), module management tools (Webpack, Browserify, etc.), task management tools (Grunt, Gulp, etc.), as small as UI library selection, interface call tools (ajax, Fetch Api, etc.), browser compatibility, etc., we have to examine one by one, and then do not use jqery plug-ins to write H5, but also in the development process to find appropriate jquery plug-ins to cooperate with the project.

Although these tools are highly customizable and improve the development efficiency of developers. However, the editor believes that the configuration work of project development has consumed a lot of energy, although most developers have their own configuration templates. For a long time, the cost of version iteration and version upgrade of various external libraries used in the project should not be low.

And when we are faced with the development needs of a WeChat Mini Programs, what do we need to consider? Wechat team to provide developer tools, and standardize the development standards, front-end common HTML, CSS has become Wechat custom WXML, WXSS,WXML, although all are custom tags, but the official documents have a clear description of the use, I believe that getting started should be very easy; WXSS, JSON and js files in the writing slightly limited, but not much the same as a whole. After unifying these standards, as a developer, you will find that you only need to focus on writing programs:

When you need to call the backend interface, call the request API

When you need to upload and download, call the upload / download API

Local storage API is called when data caching is needed

The functions of introducing map, using compass, calling payment, calling code scanning and so on can be used directly.

In terms of UI libraries, the framework naturally comes with its own weui library bonus.

And when using these API, you no longer have to worry about browser compatibility, do not have to worry about unexpected and wonderful BUG in the production environment, it can be seen that WeChat Mini Programs's development cost is really much lower than the previous web development.

Third, the difference in obtaining system-level permissions

Compared with HTML5 web applications, WeChat Mini Programs can get more system permissions, such as network communication status, data caching capabilities, and so on. These system-level permissions can be seamlessly linked with WeChat Mini Programs, which is officially claimed to have the fluency performance of Native App, which happens to be the place where HTML5 web applications are often criticized, which is why most HTML5 applications are located in simple business logic and single function.

Fourth, the fluency of the application in the production environment is different.

One of the easiest points to distinguish between Mini Program and H5 is to open H5, which actually opens a web page that needs to be rendered in a browser and stutters in the face of complex business logic or rich page interactions.

WeChat Mini Programs, who runs directly on Wechat, saves the step of rendering through the browser, so using Mini Program in Wechat is much smoother than H5. Except that it takes a few seconds to load for the first time, the switching and redirection of each page of Mini Program has been comparable to the native App and is very smooth.

Mini Program can not jump to external links, H5 has no restrictions.

Generally speaking, Mini Program has the advantages of low development cost, richer features and better user experience compared with H5. (cons: Wechat has a lot of restrictions and a lot of things can't be customized)

The above is my summary of the difference between WeChat Mini Programs and HTML5. Wechat now has 900 million monthly active users, especially since Wechat launched Volkswagen, the number of monthly active users of Wechat has also increased significantly, which has brought a very convenient entrance for WeChat Mini Programs. With 900 million as the base, WeChat Mini Programs laid the foundation.

WeChat Mini Programs is not HTML5, it is based on Wechat's independent development model, can save people's development costs and development cycle.

Thank you for reading! This is the end of the article on whether WeChat Mini Programs is a html5 or not. I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report