2024-07-11
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
HarmonyOS (codenamed Ark, officially known as Huawei Terminal HarmonyOS Intelligent Device Operating System Software) is a distributed operating system developed by Huawei since 2012 and officially released in August 2019. The system uses "distributed" technology to integrate multiple devices such as mobile phones, computers, tablets, TVs, cars and smart wearables into a "super terminal", making it easy for users to operate and share resources of various devices. Through this blog, I will record the key points and difficulties I encountered in learning HarmonyOS syntax.
ArkTS
The language is based onjavaScript
andTypeScript
The enhancement and optimization ofjs
andts
The functions it has can be fully controlled by the web page control and data status updateArkTS
to fulfill.ArkTS
Has strong expansion capabilities, such as declarative UI, state management, etc.
Compared with our normal front-end code development, we need to master bothhtml
, css
, javaScript
three languages. But we useArkTS
To develop, just useArkTS
One language, and the code is simple and convenient
If all of this is implemented using a language similar to JS, will its operating efficiency and performance be good?
Arkts
Although the language is implemented with a declarative UI front end, there is an Ark compiler at its bottom. This compiler will compile the TS language we write into bytecode, and finally convert it into machine code to run. And it will advance the translation process from the runtime to the compilation phase, thereby greatly improving the efficiency of the operation. (AOT
technology)
ArkTS
The language has a cross-platform adaptation layer and bridge layer, so we useArkTS
The applications developed also have the ability to adapt and access multiple systems.ArkTS
Some characteristics and advantages of the language in multi-system adaptation and access:
Cross-platform compatibility:ArkTS
One of the design goals of the language is to achieve cross-platform compatibility. It provides consistent syntax and features so that developers can write code once and run it on different operating systems without a lot of modifications and adjustments.
Operating system interface encapsulation:ArkTS
It provides interface encapsulation for different operating systems, allowing developers to easily access and call operating system-specific functions and services, including file system access, network communication, graphical interface, etc.
Third-party library and tool support:ArkTS
Support for integration of third-party libraries and tools enables developers to leverage existing ecosystem resources to extend the functionality and capabilities of their applications. These libraries and tools can be specific to a particular operating system or cross-platform.
Multi-system adaptation layer:ArkTS
Provides multiple system adaptation layers to handle the differences and features between different operating systems. These adaptation layers provide unified interfaces and functions, allowing developers to write common code on different systems to implement cross-platform applications.
by usingArkTS
Developers can deploy and run the applications they develop on different operating systems. This multi-system adaptation and access capability enables developers to develop and maintain applications more efficiently, while also providing users with a better cross-platform experience.
ArkTS
The language's multi-system adaptation and access capabilities allow developers to easily develop cross-platform applications and take advantage of operating system-specific features and services. This provides developers with greater flexibility and convenience, while also bringing users a better application experience.