DivKit
This document is in Russian/This document in Russian
Branch info
Table of Contents
- Table of Contents
- Description
- Features of use and build
- Install and Build
- Screenshots
- Usage options
- Project Structure
- Terms of Use and Participation in Development
Description
DivKit is an open source Server-Driven UI (SDUI) framework. It allows you to roll out server-sourced updates to different app versions. DivKit is an excellent choice to start using server-driven UI in your project because it can be easily integrated as a simple view in any part of your app. At the starting point, you don’t need a server integration. You can include all JSON on the client-side to try it in a real-world application.
Features of use and build
The project is built using the Flutter SDK.
Plugins that are used:
Install and Build
The application is built on Linux, it is best to use Ubuntu not older than 22.04. To build the application from Windows, you need to install
WSL.
Before building the application you need to have the following components:
- Platform SDK
- Flutter SDK
- Aurora SDK for the Aurora OS emulator. These tools can be installed using the programs Aurora CLI or Aurora Toolbox.
Next, using the command:
flutter doctor --verbose
to make sure that the Aurora toolchain is available.
The command to build an application for Aurora OS in Debug mode for ARM 64bit platform.
flutter build aurora --debug --target-platform=aurora-arm64
It is preferable to develop in Visual Studio Code.
Screenshots
Usage options
There are three scenarios available on the homepage: the ability to load a json file from the device, or load the interface from Divkit Playground, download the examples that come with the application, and test mode.
- Main Demo mode is an opportunity to create an interface for the application yourself. You can load a ready json file from the device. It is possible to download the interface from Playground. To do this, you can use the Share button to take a link or scan the QR code. After that the interface is loaded on a new page. There is a Reload button to pick up the changes. It is also possible to change the orientation of the interface from Left to Right to Right to left with the LTR button. It is possible to change the design mode from Light to Dark (Light, Dark).
- In Samples mode you can see various controls that can be implemented in the final interface.
- Testing mode allows you to test individual components.
Project Structure
The project has an application structure based on Dart and C++ for Aurora OS.
- assets the directory contains json for displaying pages and application components.
-
aurora the directory contains C++ source code and resources needed for installation.
- The desktop the directory contains the rpm package build settings.
- The ru.auroraos.DivKit.desktop the file defines the display and startup options for the application.
- The icons the directory contains application icons for supported screen resolutions.
- The rpm the directory contains the rpm package build settings.
- The ru.auroraos.DivKit.spec the file is used by the rpmbuild tool.
- The CMakeLists.txt the file describes the project structure for the cmake build system.
- The main.cpp the file is the entry point to the application.
- The desktop the directory contains the rpm package build settings.
- The lib the directory contains the Dart implementations of the application.
- The pubspec.yaml the file defines the project configuration and is used to define project dependencies
Terms of Use and Participation in Development
Part of the project is provided under license, which allows it to be used in third-party applications.
The other is provided under licenses.
The Participant Agreement governs the rights granted by the participants to the Open Mobile Platform Company.
Participant information is listed in the AUTHORS file.
The Code of Conduct is the current set of rules of the Open Mobile Platform Company, which communicates the expectations for interaction between community members when communicating and working on projects.