This document is intended for novices at developing OpenHarmony applications. It will introduce you to the OpenHarmony project directory structure and application development process, by walking you through a stripped-down, real-world example – building two pages and implementing redirection between them. The following figure shows how the pages look on the DevEco Studio Previewer.
Before you begin, there are two basic concepts that will help you better understand OpenHarmony: UI framework and application model.
OpenHarmony provides a UI development framework, known as ArkUI. ArkUI provides a full range of capabilities you may need for application UI development, ranging from components to layout calculation, animation, UI interaction, and drawing capabilities.
ArkUI comes with two development paradigms: ArkTS-based declarative development paradigm (declarative development paradigm for short) and JavaScript-compatible web-like development paradigm (web-like development paradigm for short). You can choose whichever development paradigm that aligns with your practice.
Development Paradigm | Programming Language | UI Update Mode | Applicable To | Intended Audience |
---|---|---|---|---|
Declarative development paradigm | ArkTS | Data-driven | Applications involving technological sophistication and teamwork | Mobile application and system application developers |
Web-like development paradigm | JavaScript | Data-driven | Applications and service widgets with simple UIs | Frontend web developers |
For more details, see UI Development.
The application model is the abstraction of capabilities required by OpenHarmony applications. It provides necessary components and running mechanisms for applications. With application models, you can develop applications based on a unified set of models, making application development simpler and more efficient. For details, see Elements of the Application Model.
Along its evolution, OpenHarmony has provided two application models:
For details about the differences between the FA model and stage model, see Interpretation of the Application Model.
To help you better understand the preceding basic concepts and application development process, Getting Started provides a development example that contains two pages in different programming languages and application models.
Download the latest version of DevEco Studio.
Install DevEco Studio and configure the development environment. For details, see Setting Up the Development Environment.
When you are done, follow the instructions in Getting Started with ArkTS in Stage Model, Getting Started with ArkTS in FA Model, and Getting Started with JavaScript in FA Model.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。