Before You Start

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.

en-us_image_0000001364254729

Before you begin, there are two basic concepts that will help you better understand OpenHarmony: UI framework and application model.

Basic Concepts

UI Framework

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.

Application Model

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:

  • Feature Ability (FA) model. This model is supported by OpenHarmony API version 7 and 8. It is no longer recommended. For details about development based on the FA model, see FA Model Development Overview.
  • Stage model. This model is supported since OpenHarmony API version 9. It is recommended and will evolve for a long time. In this model, classes such as AbilityStage and WindowStage are provided as the stage of application components and windows. That's why it is named stage model. For details about development based on the stage model, see Stage Model Development Overview.

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.

Tool Preparation

  1. Download the latest version of DevEco Studio.

  2. 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.