The picture shows Dong Hongping, Didi Chuxing’s technical team, sharing MPX applications at the Small Program Technology Summit

MPX is an enhanced small program framework opened by Didi Chuxing’s front-end team in November 2018, which is dedicated to improving the small program development experience. Through MPX, we can develop small programs with the most advanced Web development experience (VUE + Webpack) to deeply optimize the production performance.

MPX features:

  • Data response features (watch/computed)
  • Enhanced template syntax (dynamic components/style binding/class name binding/inline event functions/two-way binding, etc.)
  • Deep performance optimization (native custom components/setData based on dependency collection and data variation)
  • Webpack compilation (NPM/loop dependency /Babel/ESLint/ CSS precompilation/code optimization, etc.)
  • Single-file component development
  • State management (VUEX specification/multi-instance/mergable)
  • Cross-team cooperation (Packages)
  • Logical reuse capabilities (mixins)
  • Scaffolding support
  • Full support for small program specification itself
  • Alipay small program support

MPX2.0 is now officially released! Support for compilation of all applet platforms and across applet platforms in the industry, click here for details, click here for migration guide

Key new features in MPX 2.0:

  • Complete support for all the small program platforms that have been released in the industry (WeChat, Alipay, Baidu, QQ, Toutiao);
  • MPX applet cross-platform development, support the existing MPX WeChat project compilation output to other supported applet platform run, click to view details;
  • Small program native components cross-platform compilation, support the existing WeChat native components compiled output to run in other supported small program platform;
  • Deep subcontracting optimization, accurate subcontracting resource judgment during compilation, all subcontracting resources of ONLY (components, JS, external styles, external templates, WXS, image media, etc.) will be accurately output to the subcontracting directory;
  • WXS module is fully supported in the render function, click on the render function to see details;
  • Support template introduction, inline WXS, custom Tabbar, independent subcontracting, Workers, cloud development and other native capabilities to further improve native compatibility.

Compared with the mainstream small program cross-end framework in the industry, MPX is more focused on small program development itself, and has the following advantages in small program development:

  • Enhancements based on the technical standards of the applet itself, without heavy DSL conversion, will result in fewer development pits;
  • Fully compatible with native applet technical specifications, zero cost migration of native applet projects;
  • Cross-platform development aims to cross small program platforms. Most of the differential smoothing is done in the compilation stage, which greatly reduces the increase of package volume in the runtime adaptation layer.
  • Support the industry WeChat small program component library (such as Vant, IView, etc.) directly converted to other small program platform running;
  • Great emphasis on small program performance, providing deep setData and packet volume optimization.

See the official documentation and this article for more details on MPX.

Interested students can focus on making the project address: