About Mini Program
The Mini Program is a new technology that helps you quickly develop high-quality services and grow your business on mobile apps. It can be easily acquired and provides a better user experience for mobile users.
The Mini Program Overview
As is known to all that mobile web technology can help us to move the business forward quickly with its flexibility. Now we put forward the Mini Program, a generalized concept that users can experience many services without installing many mobile apps on their phones.
The main development language of the Mini Program is JavaScript, and the development experience of the Mini Program is similar to web development. For our developers, the migrating cost of moving from the HTML5 to Mini Program is kept to a minimum.
Picture 1 The Mini Program Overview
Differences Between Mini Program Development and Web Development
As shown above, the App Container is the runtime of a DSL(Domain Specific Language) Mini Program. The render engine and JS engine are independent of each other so they can run in parallel. On the other hand, in web development, they run in serial and a longtime-running script may cause non-responsive UI.
Web developers can use DOM APIs provided by the browser to perform DOM selection and operation. In Mini Program development, we practise separation of concerns and make UI rendering and JS business logic into distinct sections. While the UI layout is provided by the declarative axml
language, the JS business layer does not include DOM manipulation and therefore, JS objects such as window
or document
are not available in Mini Program JS layer. This design makes some DOM-dependent JS libraries, such as jQuery, unavailable. Also, the JS layer does not include Node.js runtime, so certain Node.js-specific NPM packages can not be used the Mini Program project.
Why Using Mini Program
As is known to all, an HTML5 app is sandboxed and has its limitation to access native device capability, such as the reliable network, the powerful storage abilities, etc. And users may wait for HTML5 resource downloading in a long time because of the poor network, and this situation may cause white-screen issues frequently. Besides, the smooth transitions can not be achieved in HTML5 since the page switching and the tap delay frequently. Finally, the unresponsive UI may hurt the user experience.
So we present you Mini Program, with the following features
- Acquiring App services without installing Apps
- Faster loading
- More powerful capacities
- Almost native experience
- Efficient and simple development
The Operating Environments of Mini Program
The operating environments of Mini Program include the two major mobile OSs: iOS and Android, and the Mini Program's IDE: Mini Program Studio. These three operating environments of Mini Program are also different in their working mechanism, as shown in Table 1.
Operating environment | Logical layer | View layer |
iOS | JavaScriptCore | WKWebView |
Android | ServiceWorker | Chromium WebView |
Mini Program Studio | NWJS | Chrome WebView |
Table 1 The Mini Program operating environment
The Mini Program Components and APIs
The Mini Program provides many components and APIs which can be used. For more information, you can check Component Reference and API Reference documentations.