ArkUI

Last updated
ArkUI
Developer(s) Huawei
Initial releaseOctober 22, 2021
Operating system HarmonyOS, OpenHarmony, Oniro OS
Type Software framework
License open source, Apache License [1]
Website https://developer.harmonyos.com/en/develop/arkUI

ArkUI is a declarative based user interface framework for building user interfaces on native HarmonyOS, OpenHarmony alongside Oniro OS applications developed by Huawei for the ArkTS and Cangjie programming language. [2]

Contents

Overview

ArkUI 3.0 is declarative in eTS (extended TypeScript) in HarmonyOS 3.0, followed by main ArkTS programming language in HarmonyOS 3.1, contrasting with the imperative syntax used in Java development in earlier versions of HarmonyOS in HarmonyOS 1.0 and 2.0. ArkUI allows for 2D drawing as well as 3D drawing, animations, event handling, Service Card widgets, and data binding. ArkUI automatically synchronizes between UI views and data. [3]

ArkUI integrates with DevEco Studio IDE to provide for real-time previews during editing, alongside support for debugging and other development features. [4]

ArkJS primarily used for web development paradigm, based on JavaScript that targets smaller and basic applications on ArkUI for web developers on JS and CSS. [5]

History

During HDC 2021 on October 22, 2021, the HarmonyOS 3.0 developer preview introduced ArkUI 3.0 for eTS, JS programming languages with ArkCompiler. Compared to previous versions of ArkUI 1.0 and 2.0 under imperative development with Java in earlier versions of HarmonyOS. [6]

During HDC 2022 HarmonyOS 3.1 in November 2022, Huawei ArkUI evolved into full declarative development featuring declarative UI capabilities, improved layout ability, component capability improvement and others. [7] In April 2023, HarmonyOS 3.1 Beta 1 build included ArkUI declarative 2D and 3D drawing capabilities. The upgrade also improves layout, component, and app state management capabilities. [8]

During HDC 2023, August 2023, Huawei announced HarmonyOS 4.0 improvements of ArkUI with ArkTS alongside native HarmonyOS NEXT software development using Ark Engine with ArkGraphics 2D and ArkGraphics 3D. Also, the company announced a cross platform extension of ArkUI called ArkUI-X which would allow developers to run applications across Android, iOS and HarmonyOS under one project using DevEco Studio IDE and Visual Studio Code plugins. On January 18, 2024, during HarmonyOS Ecology Conference, Huawei revealed the HarmonyOS NEXT software stack, that included ArkUI/ArkUI-X programming framework with the Ark Compiler/BiSheng Compiler/Ark Runtime compiler & runtime, for both ArkTS and incoming Cangjie programming language. [9] Cangjie is a programming language designed to create Chinese characters. Its name comes from the Cangjie input method, which is a popular method of typing Chinese characters on the keyboard based on their shape. [2]

ArkUI-X

ArkUI-X
Developer(s) Huawei
Initial releaseDecember 8, 2023
Operating system Android, iOS, OpenHarmony, Oniro OS, HarmonyOS, Web platform (ArkJS)
Type Application framework
License Apache License
Website https://developer.harmonyos.com/en/develop/arkUI

ArkUI-X is an open-source UI software development kit which is the extension of ArkUI created by Huawei. It is used to develop cross platform applications as an application framework from a single codebase for any platform such as Android, iOS, OpenHarmony and native HarmonyOS with HarmonyOS NEXT system, including Web platform with ArkJS which was released on December 8, 2023, after Canary 1 build on August 4, 2023. [10]

ArkUI-X consists of both a UI language and a rendering engine. When a ArkUI-X application is compiled, the key modules used by ArkUI, such as the core engine, graphics engine, and ArkTS runtime, are all cross-platform. The goal is to allow developers to build advanced, high-performance applications on open source OpenHarmony as foundation that can run on different OS platforms while using a single set of master code in reduced development times. [11]

Examples

The following is an example of a simple Hello World program. It is standard practice in ArkUI to separate the application struct and views into different structs, with the main view named Index. [12]

importArkTS// Index.etsimportrouterfrom'@ohos.router';@Entry@ComponentstructIndex{@Statemessage:string='Hello World'build(){Row(){Column(){Text(this.message).fontSize(50).fontWeight(FontWeight.Bold)// Add a button to respond to user clicks.Button(){Text('Next').fontSize(30).fontWeight(FontWeight.Bold)}.type(ButtonType.Capsule).margin({top:20}).backgroundColor('#0D9FFB').width('40%').height('5%')// Bind the onClick event to the Next button so that clicking the button redirects the user to the second page..onClick(()=>{router.pushUrl({url:'pages/Second'})})}.width('100%')}.height('100%')}}

See also

Related Research Articles

A computing platform, digital platform, or software platform is an environment in which software is executed. It may be the hardware or the operating system (OS), a web browser and associated application programming interfaces, or other underlying software, as long as the program code is executed using the services provided by the platform. Computing platforms have different abstraction levels, including a computer architecture, an OS, or runtime libraries. A computing platform is the stage on which computer programs can run.

Windows Presentation Foundation (WPF) is a free and open-source user interface framework for Windows-based desktop applications. WPF applications are based in .NET, and are primarily developed using C# and XAML.

The Android Package with the file extension apk is the file format used by the Android operating system, and a number of other Android-based operating systems for distribution and installation of mobile apps, mobile games and middleware. A file using this format can be built from source code written in either Java or Kotlin.

<span class="mw-page-title-main">EMUI</span> Mobile operating system by Huawei

EMUI (formerly known as Emotion UI, and also known as MagicOS is a HarmonyOS/Android mobile operating system developed by Chinese technology company Huawei. It is used on the company's smartphones and tablet computers.

HarmonyOS (HMOS) is a distributed operating system developed by Huawei for smartphones, tablets, smart TVs, smart watches, personal computers and other smart devices. It has a single real-time microkernel design in kernel mode with a single framework: the operating system derives from HarmonyOS NEXT, based on OpenHarmony operating system family that is the user mode of HarmonyOS NEXT system that takes full L0-L2 source code derived from LiteOS roots that selects suitable kernels from the kernel abstraction layer. The operating system was officially launched by Huawei in August 2019.

<span class="mw-page-title-main">Huawei Mobile Services</span> Proprietary software service

Huawei Mobile Services (HMS) is a collection of proprietary services and high level application programming interfaces (APIs) developed by Huawei Technologies Co., Ltd. Its hub known as HMS Core serves as a toolkit for app development on Huawei devices. HMS is typically installed on Huawei devices on top of running HarmonyOS operating system, and on its earlier devices running the Android operating system with EMUI including devices already distributed with Google Mobile Services. Alongside, HMS Core Wear Engine for Android phones with lightweight based LiteOS wearable middleware app framework integration connectivity like notifications, status etc.

<span class="mw-page-title-main">DevEco Studio</span> Integrated development environment for the HarmonyOS platform

DevEco Studio is the official integrated development environment (IDE) for Huawei's HarmonyOS operating system, built on JetBrains' IntelliJ IDEA software and Huawei's SmartAssist designed specifically for HarmonyOS development. It is available for download on Microsoft Windows and macOS based operating systems.

The version history of the HarmonyOS distributed operating system began with the public release of the HarmonyOS 1.0 for Honor Vision smart TVs on August 9, 2019. The first expanded commercial version of the Embedded, IoT AI, Edge computing based operating system, HarmonyOS 2.0, was released on June 2, 2021, for phones, tablets, smartwatches, smart speakers, routers, and internet of things. Beforehand, DevEco Studio, the HarmonyOS app development IDE, was released in September 2020 together with the HarmonyOS 2.0 Beta. HarmonyOS is developed by Huawei. New major releases are announced at the Huawei Developers Conference (HDC) in the fourth quarter of each year together with the first public beta version of the operating system's next major version. The next major stable version is then released in the third to fourth quarter of the following year.

<span class="mw-page-title-main">OpenHarmony</span> Family of open-source operating systems based on OpenHarmony

OpenAtom OpenHarmony, or abbreviated as OpenHarmony (OHOS), is a family of open-source distributed operating systems based on HarmonyOS derived from LiteOS, donated the L0-L2 branch source code by Huawei to the OpenAtom Foundation. Similar to HarmonyOS, the open-source distributed operating system is designed with a layered architecture, which consists of four layers from the bottom to the top, i.e., the kernel layer, system service layer, framework layer, and application layer. It is also an extensive collection of free software, which can be used as an operating system or can be used in parts with other operating systems via Kernel Abstraction Layer subsystems.

The HarmonyOS App Pack or the App file, identified with the file extension ".app", serves as the file format used by the HarmonyOS operating system. It functions as a native HarmonyOS app for distribution and installation through Huawei AppGallery, or for distribution through Huawei Ability Gallery in respect of installation-free apps under both former classic dual-framework and current HarmonyOS NEXT system of unified OpenHarmony app framework. The App file is also used by a number of other open source HarmonyOS-based operating systems such as OpenHarmony and Oniro OS-based operating systems for distribution and installation of applications, video games and middleware. Including non OpenHarmony-based operating systems, such as GNU Linux-based Unity Operating System that supports the app file format.

HarmonyOS NEXT is a proprietary distributed operating system and an iteration of HarmonyOS, developed by Huawei to support only HarmonyOS native apps. The operating system base is primarily aimed at software and hardware developers that deal directly with Huawei. It does not include Android's AOSP core and is incompatible with Android applications.

Huawei Ark Engine is a conglomerate of proprietary application programming interfaces (APIs) for handling tasks related to system and multimedia, especially game programming and video, on HarmonyOS and OpenHarmony platform such as software graphics engine stack, ArkGraphics 2D for 2D computer graphics, 2D Drawing high-performance and ArkGraphics 3D graphics engine stack that support standard OpenGL and Vulkan backend, interactive graphics with ArkUI binding support, multimedia engine for audio and video, memory engine, scheduling engine, storage engine and low power consumption engine.

ArkGraphics 3D is an open source, 3D graphic stack developed by Huawei as a subset of Ark Engine for HarmonyOS and OpenAtom OpenHarmony. The engine layer includes two modules, such as 2D graphics library and 3D graphics engine with both OpenGL with OpenGL Shading Language and WebGL as render service backend. The 2D graphics library provides the underlying API for 2D graphics rendering, and supports the underlying capabilities of graphics rendering and text rendering for ArkUI. AGP Engine as a component of ArkUI, it provides the 3D drawing capability of the system.

Ark Compiler, also known as ArkCompiler, is a unified compilation and runtime platform that supports joint compilation and running across programming languages and chip platforms, also operating systems of open-source OpenHarmony, Oniro OS, alongside proprietary HarmonyOS with single core system HarmonyOS NEXT included on native APP in Event-driven programming in a unified development environment and formerly built for Android-based EMUI for Huawei smartphones and tablets with HMS-enabled apk apps on AppGallery that improves app performance. It supports a variety of dynamic and static programming languages such as JS, TS, and ArkTS. It is the compilation and runtime base that enables OpenHarmony, Oniro OS alongside HarmonyOS NEXT to run on multiple device forms such as smart devices, mobile phones, PCs, tablets, TVs, automobiles, and wearables. ArkCompiler consists of two parts, compiler toolchain and runtime.

BiSheng Compiler is an open-source compiler toolchain developed by Huawei for general-purpose processor architectures, such as Kunpeng within HiSilicon domain. It is based on LLVM, and introduces and enhances multiple compilation optimization technologies and supports different programming languages, such as ArkTS, Cangjie, C, C++ and Fortran.

ArkTS is a high-level general-purpose, multi-paradigm, compiled programming language developed by Huawei which is a superset of open-source TypeScript, in turn a superset of JavaScript formerly used in July 2022 HarmonyOS 3.0 version, alongside its evolved percussor, extended TypeScript (eTS) built for HarmonyOS development as a shift towards Declarative programming. ArkTS compiles to machine code via it's Ahead-of-time compilation Ark Compiler. ArkTS was first released in September 30, 2021 on OpenHarmony, and the ArkTS toolchain has shipped in DevEco Studio since version 3.1, released in 2022. Since, OpenHarmony 4.0 release on October 26, 2023, ArkTS APIs has been added to the open source community to contribute.

ArkGraphics 2D is an open source 2D graphics stack for OpenHarmony-Oniro based and HarmonyOS operating systems. The engine layer includes two modules, such as 2D graphics library and 3D graphics engine with both OpenGL with OpenGL Shading Language and WebGL as render service backend. The 2D graphics library provides the underlying API for 2D graphics rendering, and supports the underlying capabilities of graphics rendering and text rendering for ArkUI.

Huawei PanGu, PanGu, PanGu-Σ or PanGu-π is a multimodal large language model developed by Huawei. It was announced on July 7, 2023, positioned as a contender to other multimodal large language models.

<span class="mw-page-title-main">Hvigor</span> Free software build automation tool

Hvigor is a build automation tool for multi-language software development built on TypeScript. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing of a number of programming languages such as JS, eTS on older versions, ArkTS app development for DevEco Studio IDE.

<span class="mw-page-title-main">HarmonyOS Sans</span> Geometric sans-serif typeface

HarmonyOS Sans is a sans-serif typeface created by Huawei. It was first made available to developers on June 9, 2021, and is utilized within the HarmonyOS and OpenHarmony operating systems. It represents Huawei's second typeface following its corporate Huawei Sans sans-serif typeface.

References

  1. "ArkUI API参考". Gitee. OpenAtom OpenHarmony. Retrieved 21 May 2024.
  2. 1 2 Mateusz, Macocha. "What is Huawei cangjie programming language?". NEATsoft. Retrieved Mar 19, 2024.
  3. "2:2 Introduction to the ArkUI framework". arkui.club. © arkui.club. Retrieved 12 February 2024.
  4. Sarkar, Amy. "HarmonyOS 3.0 ArkUI 3.0: Declarative User Interface framework". HC Newsroom. HC Newsroom. Retrieved 12 February 2024.
  5. Kapuściak, Kacper; Wajgelt, Juliusz; Schmidt, Stefan. "Bringing Graphical Applications to Oniro on the Example of React Native". YouTube. Eclipse Foundation. Retrieved 29 February 2024.
  6. "New release of HarmonyOS 3.0.0 developer preview". SegmentFault. SegmentFault. Retrieved 12 February 2024.
  7. Balogun, Yusuf. "Huawei Enters Declarative Development with HarmonyOS 3.1 Version Announcement". techgenyz. techgenyz. Retrieved 12 February 2024.
  8. Sarkar, Amy. "HarmonyOS 3.1 Beta 2 rolling out". HC Newsroom. HC Newsroom. Retrieved 12 February 2024.
  9. Bhati, Kamlesh. "Huawei HarmonyOS NEXT Official Now: Bring Spatial Design and Vivid Color Concepts". Sparrownews.com. Sparrownews.com. Retrieved 12 February 2024.
  10. "ArkUI-X Release Notes". ArkUI-X GitHub. ArkUI-X GitHub. Retrieved 12 February 2024.
  11. "ArkUI-X 预览版正式开源". 知乎专栏 (in Chinese). Retrieved 2024-05-21.
  12. "Getting Started with ArkTS in Stage Model - Implementing Page Redirection". HarmonyOS. HarmonyOS. Retrieved 12 February 2024.