WeChat Mini Program is not HTML5. It is based on WeChat’s independent development model, which can save people’s development costs and development cycles. The differences between WeChat mini programs and HTML5: 1. Differences in operating environment; 2. Differences in development costs; 3. Differences in obtaining system-level permissions; 4. Differences in the running fluency of applications in production environments.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
The full name of HTML in English is Hyper Text Markup Language, which is hypertext markup language. HTML5 is a technology, the shell it is attached to is a browser, and a mini program is an application based on WeChat that does not require downloading and installation.
From the perspective of "front-end development", there are many differences between WeChat applet and HTML5. In summary, there are four differences!
First, the difference in operating environment
The traditional HTML5 operating environment is a browser, including webview, while the operating environment of the WeChat applet is not a complete browser device. Please note that what I write here is a "non-complete browser" for the following reasons:
HTML5 related technologies (not all) will be used in the development process of small programs.
The final release of the mini program requires WeChat review. WeChat can update the mini program into its own software without updating its own software, which reminds us of the ReactNative framework. And some developers have discovered that the react and NodeWebkit libraries are used in the source code of WeChat applet development tools.
The official document emphasizes that the window object and document object commonly used in browsers cannot be used in scripts (based on this, libraries that operate DOM like zepto/jQuery have been completely abandoned).
So I think that the running environment of the mini program is very likely to be a built-in parser completely reconstructed by the WeChat development team based on the browser kernel. It is specially optimized for mini programs and matches its own defined development language standards. , improving the performance of the mini program.
However, since WeChat provides developers with development tools, and the development tools also have built-in programming, debugging, development environment, and publishing, we don’t need to discuss its final operating environment anymore. As long as we follow the official Just develop the document. And the move of the WeChat team to provide developers with development tools reminds me of the X-CODE development tools provided by Apple to developers. It can be imagined that WeChat's "ambition" is evident
Second Article, difference in development costs
Here I raise a question, when we face an HTML5 web development requirement, what do we need to consider?
Leave aside development tools (vscode, sublimtext, Atom, etc.), as well as front-end frameworks (Angular, react, vue, backbone, etc.), module management tools (Webpack, Browserify, etc.), task management tools ( Grunt, Gulp, etc.), as small as UI library selection, interface calling tools (ajax, Fetch Api, etc.), browser compatibility, etc. must be considered one by one. Even if it is not easy to use jqery plug-in to write H5, we must also consider it during the development process. Go find a suitable jquery plug-in to match the project.
Although these tools are very 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. The long-term cost of version iterations and version upgrades of various external libraries used in the project should not be low.
And when we face the development needs of a WeChat applet, what do we need to consider? The WeChat team has provided developer tools and standardized development standards. The common HTML and CSS on the front end have become WeChat’s customized WXML and WXSS. Although WXML is all custom tags, there are clear usage introductions in the official documents. , I believe it should be very easy to get started; the writing methods in WXSS, JSON and js files are slightly restricted, but overall they are similar. 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 back-end interface, call the request API;
When you need to upload and download, call the upload and download API;
When you need to cache data, call the local storage API;
Introducing maps, using compass, calling payment, calling scan code and other functions can be used directly;
In terms of UI library, the framework naturally comes with its own weui Library bonus;
And when using these APIs, you no longer have to worry about browser compatibility, and you don’t have to worry about unpredictable and wonderful bugs in the production environment. It can be seen that the WeChat applet The development cost is indeed much lower than previous web development.
Article 3. Differences in obtaining system-level permissions
Compared with HTML5 web applications, WeChat applet can obtain more system permissions, such as network communication status and data Caching capabilities, etc. These system-level permissions can be seamlessly connected with WeChat mini programs, which is what is officially claimed to have the smooth performance of Native Apps. This happens to be an area where HTML5 web applications are often criticized, and this is also the majority of HTML5 applications. The scenario is positioned because the business logic is simple and the function is single.
Article 4: The running fluency of applications in the production environment is different.
The easiest thing to distinguish between mini programs and H5 is that opening H5 actually opens a web page, and the web page needs to be rendered in the browser. When faced with complex business logic or rich page interactions, The page will freeze.
The WeChat applet runs directly on WeChat, eliminating the step of rendering through the browser. Therefore, using the applet in WeChat will be much smoother than H5. In addition to the loading time of a few seconds when opening for the first time, the experience of switching and jumping between various pages of the mini program is comparable to that of the native app and is very smooth.
Mini programs cannot jump to external links, and H5 has no restrictions.
In summary, mini programs have the advantages of lower development costs, richer functions, and better user experience than H5. (Disadvantages: WeChat has made many restrictions, and many things cannot be customized)
The above is my summary of the differences between WeChat mini programs and HTML5. WeChat currently has 900 million monthly active users. Especially after WeChat launched the public account, WeChat’s monthly active users have also increased significantly, which provides a very convenient entrance to WeChat mini programs. Taking 900 million as the base number, it laid the foundation for WeChat mini programs.
WeChat Mini Program is not HTML5, it is based on WeChat’s independent development model, which can save people’s development costs and development cycles.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of Is WeChat mini program HTML5?. For more information, please follow other related articles on the PHP Chinese website!

HTML and React can be seamlessly integrated through JSX to build an efficient user interface. 1) Embed HTML elements using JSX, 2) Optimize rendering performance using virtual DOM, 3) Manage and render HTML structures through componentization. This integration method is not only intuitive, but also improves application performance.

React efficiently renders data through state and props, and handles user events through the synthesis event system. 1) Use useState to manage state, such as the counter example. 2) Event processing is implemented by adding functions in JSX, such as button clicks. 3) The key attribute is required to render the list, such as the TodoList component. 4) For form processing, useState and e.preventDefault(), such as Form components.

React interacts with the server through HTTP requests to obtain, send, update and delete data. 1) User operation triggers events, 2) Initiate HTTP requests, 3) Process server responses, 4) Update component status and re-render.

React is a JavaScript library for building user interfaces that improves efficiency through component development and virtual DOM. 1. Components and JSX: Use JSX syntax to define components to enhance code intuitiveness and quality. 2. Virtual DOM and Rendering: Optimize rendering performance through virtual DOM and diff algorithms. 3. State management and Hooks: Hooks such as useState and useEffect simplify state management and side effects handling. 4. Example of usage: From basic forms to advanced global state management, use the ContextAPI. 5. Common errors and debugging: Avoid improper state management and component update problems, and use ReactDevTools to debug. 6. Performance optimization and optimality

Reactisafrontendlibrary,focusedonbuildinguserinterfaces.ItmanagesUIstateandupdatesefficientlyusingavirtualDOM,andinteractswithbackendservicesviaAPIsfordatahandling,butdoesnotprocessorstoredataitself.

React can be embedded in HTML to enhance or completely rewrite traditional HTML pages. 1) The basic steps to using React include adding a root div in HTML and rendering the React component via ReactDOM.render(). 2) More advanced applications include using useState to manage state and implement complex UI interactions such as counters and to-do lists. 3) Optimization and best practices include code segmentation, lazy loading and using React.memo and useMemo to improve performance. Through these methods, developers can leverage the power of React to build dynamic and responsive user interfaces.

React is a JavaScript library for building modern front-end applications. 1. It uses componentized and virtual DOM to optimize performance. 2. Components use JSX to define, state and attributes to manage data. 3. Hooks simplify life cycle management. 4. Use ContextAPI to manage global status. 5. Common errors require debugging status updates and life cycles. 6. Optimization techniques include Memoization, code splitting and virtual scrolling.

React's future will focus on the ultimate in component development, performance optimization and deep integration with other technology stacks. 1) React will further simplify the creation and management of components and promote the ultimate in component development. 2) Performance optimization will become the focus, especially in large applications. 3) React will be deeply integrated with technologies such as GraphQL and TypeScript to improve the development experience.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools