On October 22, 2021, at the HDC.Together 2021 keynote speech at the Huawei Developer Conference, we released the HarmonyOS 3.0.0 developer preview. The main contents include: HarmonyOS design system, ArkUI 3.0, ArkCompiler 3.0, DevEco Studio 3.0 and TS /JS API.

Among them, the UI development framework of HarmonyOS has evolved from an imperative UI framework with Java as the main programming language to a declarative UI framework (ArkUI 3.0) with TypeScript (TS for short)/JavaScript (JS for short) as the main programming language. At the same time, ArkCompiler 3.0 adds support for TS/JS language, and HarmonyOS SDK adds 6000+ TS/JS APIs, which supports TS language to develop rich media applications. In the future, TS/JS language will become more and more important in HarmonyOS application development.

Next, let us review the key content of the HarmonyOS 3.0.0 developer preview version~

Harmony Design System

The Harmony design system comprehensively considers human factors, equipment, environment and other factors to provide complete design specifications, convenient design tools, and rich design resources for cross-terminal application interface design, so that developers can create better designs.

ArkUI 3.0

ArkUI 3.0 is a set of declarative UI development framework for building HarmonyOS application interface. It helps you improve the efficiency of HarmonyOS application interface development through minimal UI information description grammar, rich UI components and dynamic effects, and real-time interface preview capabilities.

The key features of ArkUI 3.0 are as follows:

● From an imperative UI framework with Java as the main programming language to a declarative UI framework with TS/JS as the main programming language, the production efficiency is increased by 30%.

Figure 1 UI framework evolution

Why does the UI development framework have such an evolution? From the perspective of development mode, declarative is more intuitive and concise than imperative, which can further improve development efficiency; from the perspective of language, TS/JS has a wide range of ecology and greater flexibility. According to the RedMonk 2021 Q1 programming language ranking, JS language ranks first comprehensively and is currently the most used language among global developers. The JS language has a very powerful ecological community, with abundant learning resources, tripartite libraries and tool resources. Compared with static type development languages (such as Java), JS, because of the characteristics of dynamic types and script-like languages, generally has fewer lines of JS code and higher development efficiency when developing applications with similar functions. TS is a superset of JS, which effectively improves the convenience and maintainability of large-scale JS development projects.

● Provide minimal UI development syntax and components to improve the efficiency of cross-device UI development.

Figure 2 ArkUI's high efficiency

ArkUI has a minimal UI information description grammar, rich UI components and efficient cross-terminal development capabilities. Compared with traditional application interface development, the amount of code is reduced by more than 30%.

● The application performance experience is further improved through the declarative front-end and back-end unified rendering optimization design.

Figure 3 High performance of ArkUI

ArkUI uses flat unified rendering and parallel pipeline technology to ensure that the application performance experience is comparable to the Android native application experience. In typical complex scenarios, the memory can be reduced by 20%.

ArkCompiler 3.0

ArkCompiler is a unified programming platform developed by Huawei. It includes key components such as compilers, tool chains, runtimes, etc. It supports the compilation and operation of high-level languages on multiple chip platforms, and supports applications and services to run on mobile phones, personal computers, tablets, Demands on multiple devices such as TVs, cars, and smart wearables.

Figure 4 Schematic diagram of ArkCompiler3.0

The ArkCompiler 3.0 released this time includes the following key features:

● The front-end compiler supports the compilation of multiple high-level languages (including JS, TS, and Java) into unified bytecode files, shielding language differences, and improving operating efficiency and program startup performance.

● Provide multiple end-side execution modes (interpreter, JIT compiler, and AOT compiler) to form a multi-level combined operation strategy that combines device and application features to meet different device hardware specifications.

■ Interpreter: fast startup, average execution performance, and small memory footprint.

■ JIT compiler: It needs to be warmed up for startup, with high execution performance and high memory usage.

■ AOT compiler: fast startup, high execution performance, and high memory usage.

On low-end IoT devices, ArkCompiler 3.0 supports a pure interpreter execution mode to meet the memory constraints of small devices. On high-end devices, ArkCompiler 3.0 supports the execution mode of the interpreter and AOT and JIT compilers, and compiles most of the application code with the AOT compiler, so that the program can run on high-quality optimized code from the beginning to get the best Execution performance. On other devices, the strategy is selected according to the hardware conditions of the device, and the code range that needs AOT compilation for high-frequency use is set. Other codes rely on the interpreter to cooperate with the JIT compiler to run, so that the application execution performance can be maximized.

● ArkCompiler 3.0 has made a targeted optimization plan for TS/JS, with the goal of improving execution performance by a factor of two.

DevEco Studio 3.0

HUAWEI DevEco Studio is a one-stop atomization service & HarmonyOS application development platform for all scenarios and multiple devices.

DevEco Studio 3.0 provides more functions for the three stages of development, debugging and testing to improve the efficiency of cross-terminal application development.

● During the development phase, the following functions provided by DevEco Studio 3.0 help developers achieve cross-terminal efficient coding.

■ Support ArkUI3.0 framework, provide eTS super terminal project template, and support developers to create cross-terminal application projects with one click.

■ Provide real-time two-way preview capability, developers can easily adjust the UI interface while writing code.

Figure 5 Real-time preview

■ One-time development, multi-terminal deployment, supporting the same project to run on multiple devices such as mobile phones, tablets, and cars.

Figure 6 One-time development, multi-terminal deployment

● During the debugging phase, DevEco Studio 3.0 provides the following functions to help developers lower the threshold for cross-terminal distributed commissioning.

■ Provide a distributed remote simulator to reduce the cost of cross-terminal application debugging for developers.

■ Provides visual cross-device network connection and memory stack functions to reduce the difficulty of cross-terminal application debugging for developers.

Figure 7 Cross-terminal distributed commissioning

● During the integration testing phase, DevEco Studio 3.0's cloud service platform DevEco Service provides remote laboratory and integration testing service "DevEco Testing", helping developers complete cross-end application integration testing in the cloud with one click.

remote laboratory provides a 7*24-hour Huawei real machine environment, covering all types of Huawei 1+8 real machine equipment, eliminating purchase and maintenance costs, and solving the problem of developers having no equipment or incomplete equipment types when testing applications.

DevEco Testing provides developers with one-click cross-end application integration testing services on the basis of remote laboratory , covering compatibility, stability, performance, power consumption, UX testing, security and other tests.

Figure 8 DevEco Service cloud service platform

Link to Integration Testing Service DevEco Testing:

https://devecostudio.huawei.com/

TS/JS APIs

As of the day of the HDC.Together 2021 keynote speech, the Harmony SDK has added 6000+ TS/JS APIs to support the efficient development of cross-terminal applications. Covers the following capabilities:

● Distributed system services: cross-end service pull up, cross-end service call, cross-end service migration, etc.

● Multimedia capabilities: recording, playback, picture decoding, etc.

● Multithreading concurrency: Workers multithreading ability, data sharing between threads, etc.

● Declarative UI capabilities: MVVM programming model, rich UI components, dynamic effects, atomic layout capabilities, etc.

Currently, TS/JS API supports the development of rich media application scenarios, such as image gallery and calendar.

We plan to provide a TS/JS API version with enhanced UI components and enhanced distributed capabilities in 2022, and fully support the development of three-party heavy application scenarios under Huawei's super terminal, such as consulting, audio and video, social, shopping, etc.

Finally, let's take a look at the version feature roadmap of HarmonyOS 3.0.0:

The above is the HarmonyOS 3.0.0 developer preview release content. Welcome all developers to download tools and resource packs on the HarmonyOS official website to try out the new features of HarmonyOS 3.0.0 in advance. Thank you for accompanying the growth of HarmonyOS all the way!

For more information about the development features and road signs of HarmonyOS 3.0.0, please visit the official website HarmonyOS 3.0.0 page:

https://developer.harmonyos.com/cn/develop/harmonyos-sdk


看点
19 声望4 粉丝