With the continuous development and popularization of Huawei's Hongmeng operating system, more and more people are paying attention to Hongmeng development and want to master related skills. However, many people don’t know anything about it and don’t know where to start. This article will introduce you to a must-read for beginners! Related content about what languages need to be learned for Hongmeng development to help everyone get started with Hongmeng development.
ArkTS
ArkTS is HarmonyOS's preferred main application development language. ArkTS has further expanded the TypeScript (TS) ecosystem around application development, inherited all the features of TS, and is a superset of TS. Therefore, before learning the ArkTS language, it is recommended that developers have TS language development capabilities.
Basic syntax overview
You don’t know where to start when learning ArkTS, right? Never mind, let's break it down
You can split them into these parts. If you don’t understand, you can temporarily ignore the content after the colon below.
- **Decorator:** Used to decorate classes, structures, methods and variables and give them special meanings. For example, in the above example, @Entry, @Component and @State are all decorators. @Component represents a custom component, @Entry represents the custom component as an entry component, and @State represents the state variable in the component. Changes in the state variable will trigger the UI. refresh.
- **UI description:** Describe the structure of the UI in a declarative way, such as the code block in the build() method.
- **Custom component:** A reusable UI unit that can be combined with other components, such as the above struct Hello decorated with @Component.
- **System components:** The default built-in basic and container components in the ArkUI framework can be directly called by developers, such as Column, Text, Divider, and Button in the example.
- **Property methods:** Components can configure multiple properties through chain calls, such as fontSize(), width(), height(), backgroundColor(), etc.
- **Event method:** Components can set the response logic of multiple events through chain calls, such as onClick() following Button.
There are a lot of explanations for these things. For novices, it is a little difficult to understand. As long as you remember this general format, it looks like this
@Entry
@Component
struct Index {
//放你写的数据
build() {
//放你写的页面代码
}
}1.2.3.4.5.6.7.8.9.10.
You can just fill in what you need to write directly.
In this way, Hongmeng ArkTS language is difficult to learn, but not difficult to learn.
at last
If you want to get started with Hongmeng quickly now, here is a recommended "Hongmeng (HarmonyOS) Development Learning Guide".
I hope it will be helpful to you. You can scan the QR code to get the complete document for free! ! !
"HarmonyOS Development Study Guide"
Chapter 1 Quick Start
1. Development preparation
2. Build the first ArkTS application (Stage model)
3. Build the first ArkTS application (FA model)
4. Build the first JS application (FA model)
5、…
Chapter 2 Development Basics
1. Basic knowledge of application packages
2. Application configuration file (Stage model)
3. Application configuration file overview (FA model)
4、…
Chapter 3 Resource Classification and Access
1. Resource classification and access
2. Create resource directories and resource files
3. Resource access
4、…
Chapter 4 Learning ArkTs Language
1. First introduction to ArkTS language
2. Basic grammar
3. Status management
4. Other status management
5. Rendering control
6、…
Chapter 5 UI Development
1. Overview of Ark Development Framework (ArkUI)
2. Based on ArkTS declarative development paradigm
3. Web-like development paradigm compatible with JS
4…
Chapter 6 Web Development
1. Overview of Web Components
2. Load the page using web components
3. Set basic properties and events
4. Use front-end page JavaScript in your application
5. Overview of ArkTS language basic class library
6. Concurrency
7…
11. Network and connections
12. Telephone service
13.Data management
14.File management
15.Background task management
16.Device management
17…
Chapter 7 Application Model
1. Overview of application model
2.Stage model development guidance
3.FA model development guidance
4…
Scan the QR code below to receive the "HarmonyOS Development Study Guide" for free