HubLensCross-platformdidi/dimina
didi

dimina

Mobile#Cross-platform#Mini-program#Android#iOS#HarmonyOS
View on GitHub
848

// summary

Dimina is a lightweight cross-platform mini-program framework developed by DiDi, designed to provide developers with a high-performance, cross-platform, and low-threshold development experience. The framework supports four major platforms: Android, iOS, Harmony, and Web, allowing developers to integrate mini-program logic into existing apps or package them into standalone applications. Through technologies such as resource offlining, logic-view separation, and page preloading, Dimina effectively improves cross-platform runtime performance.

// technical analysis

Dimina (Xinghe Mini Program) is a lightweight cross-platform mini program framework open-sourced by Didi, aiming to achieve high-performance cross-platform application delivery through a unified development experience. The framework adopts a logic-view separation architecture, utilizes an independent JS engine to avoid main thread blocking, and builds the underlying rendering system based on Vue3, translating mini program syntax into Vue syntax via the DMCC compiler. This design not only lowers the migration threshold for developers but also significantly improves runtime performance on Android, iOS, Harmony, and Web platforms through technical means such as resource offlining and page preloading.

// key highlights

01
Supports four major platforms: Android, iOS, Harmony, and Web, enabling 'develop once, run on multiple platforms'.
02
Adopts a logic-view separation architecture, running the logic layer through an independent JS engine to effectively avoid main thread blocking.
03
Built-in resource offline storage mechanism improves page loading speed by reducing network requests.
04
Utilizes WebView warming technology to implement page preloading, significantly optimizing user interaction response performance.
05
Provides unified native capability encapsulation APIs, making it convenient for developers to call underlying hardware functions of various platforms.
06
Builds the rendering system based on Vue3, achieving seamless translation from mini program syntax to Vue syntax via the DMCC compiler.

// use cases

01
Integrate existing mini-program logic as independent modules into current apps.
02
Develop using mini-program syntax and package into standalone native apps with one click.
03
Implement a high-performance cross-platform mini-program runtime environment with native capability calls.

// getting started

Developers first need to use the mini program development tool to create a project and write page logic, then package the code into a Xinghe mini program package via the DMCC compiler. Finally, refer to the corresponding integration documentation based on the target platform (Android, iOS, or Harmony) to integrate the mini program package into the native App for real-device debugging and release.