Getting Started with Mini Programs

What Are Mini Programs

Here’s Zhang Xiaolong’s explanation:

The introduction for the Mini Program beta was written by Zhang Xiaolong himself: “What is a Mini Program? A Mini Program is an application that can be used without downloading or installing. It realizes the dream of being within arm’s reach — users can open an app by scanning or searching, and it embodies the philosophy of ‘use and go.’ Users don’t need to install too many applications; apps are available everywhere without installation or uninstallation.” Zhang Xiaolong further elaborated on this text.

First, Mini Programs require no installation — this represents a breakthrough over existing applications.

From Windows PCs to smartphones, application installation and uninstallation has become much more lightweight. Mini Programs go even further — no download or installation needed, ready to use immediately.

Second, Mini Programs are within arm’s reach.

One scenario: you can directly scan the QR code of a smart light bulb. If it has a Mini Program, you can directly control the bulb’s power and brightness. And you don’t need to download this bulb control app.

Third, use and go — no need to uninstall. After using a Mini Program, just tap close or go back. No uninstallation needed — it’s as if it never existed.

Two key points:

  1. Entry points are limited to scanning a QR code with WeChat or searching within WeChat.
  2. Lightweight — no installation required, use and go.

Honestly, all this talk isn’t as good as experiencing it yourself.

How to try it: Update WeChat to the latest version, tap DiscoverMini Programs, search for JD Shopping to access JD’s Mini Program.

Hands-on Development

The official developer documentation is quite detailed with plenty of illustrations:

https://mp.weixin.qq.com/debug/wxadoc/introduction/index.html?t=201715

Two things to note:

  1. The registration email must not have been used to register a public platform, open platform, enterprise account, or bound to a personal account.

  2. Currently, only enterprises, government agencies, media, or other organizations can register Mini Programs. So how can individual developers play with them?

    Individual developers can choose “Individual Business,” fill in some information, and submit — this will pass registration and get you an AppID. During development, you can only do online debugging and cannot publish your Mini Program, but this approach works for just trying things out.

The WeChat QR scan verification, phone verification, and ID verification during registration are not covered here — if you’ve registered an official account before, you should know the drill.

Downloading the Dev Tools

Download: https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html

Available for Win64, Win32, and macOS — choose accordingly.

Starting Development

Refer to the development documentation:

https://mp.weixin.qq.com/debug/wxadoc/dev/framework/structure.html?t=201715

A Mini Program page consists of four files:

  1. .js file — required, handles page logic
  2. .wxml file — required, handles page structure (similar to HTML)
  3. .wxss file — optional, handles page styling (similar to CSS)
  4. .json file — optional, handles page configuration

Other components and APIs are all standardized. If you have previous experience with React Native, AngularJS, or Vue.js, you should pick it up quickly. If not, understanding the concept of data binding and referencing the Mini Program documentation shouldn’t be too difficult either.

Summary

Personally, I feel Mini Program use cases are quite important, mainly constrained by the single entry point — but that’s also a defining characteristic. As for which scenarios will take off, I’m looking forward to everyone’s creative ideas.