How openharmony/arkui_ace_engine_lite works
This project is a JS UI framework designed for developing OpenHarmony applications on mini systems. Its purpose is to provide a complete solution for JavaScript-based UI development by combining a JavaScript data binding engine, a JavaScript runtime (providing code parsing and execution), and a JavaScript framework layer (built in C++ that exposes APIs and UI components). The README and the file tree together show a multi-layered architecture with many interdependent subsystems.
Primary System Components
• JavaScript Data Binding Framework – responsible for propagating data changes to the UI.
• JavaScript Runtime – includes the engine that parses and executes JS code (found in the “native_engine” and “packages” directories).
• JavaScript Framework – implemented in C++ to expose APIs and UI components; look into directories such as “src”, “common”, “module_manager”, “include”, etc.
• External Interfaces – the “interfaces” directory shows the APIs that are exposed externally (including innerkits and builtins that support third-party integrations).
• Example Applications and Test Suites – represented by “frameworks/examples” and the “test” directory that provide usage and validation of the framework.
• Tooling and Target Configurations – the “tools” directory (also “targets”) includes PC simulators and configuration files that help test, simulate, and compile the framework for different devices.
Relationships and Data Flow Between Components
• How JavaScript application code (running on top of the framework) interacts with the data binding layer.
• The data binding framework then communicates with the runtime to execute JS and with the native engine adapter (in “native_engine”) to provide low-level support.
• The JavaScript framework layer (using components from “src”, “common”, “module_manager”) wraps these functionalities and exposes higher-level APIs to the application.
• External components call APIs from the “interfaces” layer, which in-turn invoke functionality from the framework.
• The target configurations (in “targets”) drive the behavior of the framework on different hardware or simulator environments.
Architectural Patterns and Technologies
• Modular design: The separation into subdirectories (e.g., “common”, “module_manager”, “packages”) shows a clear modular decomposition.
• Layered architecture: Display the three main layers (data binding, runtime, framework) and how each one calls or feeds data into the next.
• Integration of C++ components with JavaScript logic: Note the interplay via the native JS engine adapter and the JS API wrappers.
• Extensibility: The “interfaces” and “tools” directories emphasize that the framework is designed for both application developers and framework-level debugging and simulation.