diff --git a/en/application-dev/quick-start/Readme-EN.md b/en/application-dev/quick-start/Readme-EN.md index 77038cc101186059e9377c85d8e5b880784c2b9e..0a7533ea2389f74866ced1742937daeffe134fcc 100644 --- a/en/application-dev/quick-start/Readme-EN.md +++ b/en/application-dev/quick-start/Readme-EN.md @@ -2,10 +2,9 @@ - Getting Started - [Preparations](start-overview.md) - - [Getting Started with eTS in the Traditional Coding Approach](start-with-ets.md) - - [Getting Started with eTS in the Low-Code Approach](start-with-ets-low-code.md) - - [Getting Started with JavaScript in the Traditional Coding Approach](start-with-js.md) - - [Getting Started with JavaScript in the Low-Code Approach](start-with-js-low-code.md) + - [Getting Started with eTS in Stage Model](start-with-ets-stage.md) + - [Getting Started with eTS in FA Model](start-with-ets-fa.md) + - [Getting Started with JavaScript in FA Model](start-with-js-fa.md) - Development Fundamentals - [Application Package Structure Configuration File (FA Model)](package-structure.md) - [Application Package Structure Configuration File (Stage Model)](stage-structure.md) diff --git a/en/application-dev/quick-start/figures/01.png b/en/application-dev/quick-start/figures/01.png new file mode 100644 index 0000000000000000000000000000000000000000..ab9a01795cd6795448b16e53b7400cc7806e455c Binary files /dev/null and b/en/application-dev/quick-start/figures/01.png differ diff --git a/en/application-dev/quick-start/figures/02.png b/en/application-dev/quick-start/figures/02.png new file mode 100644 index 0000000000000000000000000000000000000000..9b06d46ea1285613c00efc7cce55e7dbe2b74a2c Binary files /dev/null and b/en/application-dev/quick-start/figures/02.png differ diff --git a/en/application-dev/quick-start/figures/04.png b/en/application-dev/quick-start/figures/04.png new file mode 100644 index 0000000000000000000000000000000000000000..ac9dd6594d8d6d3673b0f713288f41dae5b60496 Binary files /dev/null and b/en/application-dev/quick-start/figures/04.png differ diff --git a/en/application-dev/quick-start/figures/06.png b/en/application-dev/quick-start/figures/06.png new file mode 100644 index 0000000000000000000000000000000000000000..bdfc0acf1c46ded2b471894dc20af970f3c50836 Binary files /dev/null and b/en/application-dev/quick-start/figures/06.png differ diff --git a/en/application-dev/quick-start/figures/07.png b/en/application-dev/quick-start/figures/07.png new file mode 100644 index 0000000000000000000000000000000000000000..3749dcb06daed21f87088a9a46afa6d0d87bef3f Binary files /dev/null and b/en/application-dev/quick-start/figures/07.png differ diff --git a/en/application-dev/quick-start/figures/09.png b/en/application-dev/quick-start/figures/09.png new file mode 100644 index 0000000000000000000000000000000000000000..ac6dbbab11846274c42bfdd61f7bd5dfe0ace99f Binary files /dev/null and b/en/application-dev/quick-start/figures/09.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001233049004.png b/en/application-dev/quick-start/figures/en-us_image_0000001233049004.png new file mode 100644 index 0000000000000000000000000000000000000000..b34bfa591849f5f0ffd0cee1fc898ef8d2f5a5cd Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001233049004.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001233049040.png b/en/application-dev/quick-start/figures/en-us_image_0000001233049040.png new file mode 100644 index 0000000000000000000000000000000000000000..c340326cce920ed6c55965126d38ddd973d9f50a Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001233049040.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001233208988.gif b/en/application-dev/quick-start/figures/en-us_image_0000001233208988.gif new file mode 100644 index 0000000000000000000000000000000000000000..069e426658d388aa9749754910d572a3d526393c Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001233208988.gif differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001233528156.gif b/en/application-dev/quick-start/figures/en-us_image_0000001233528156.gif new file mode 100644 index 0000000000000000000000000000000000000000..594faed1d8f0bfd157040b5fdec590d5a704745d Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001233528156.gif differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001235731706.gif b/en/application-dev/quick-start/figures/en-us_image_0000001235731706.gif deleted file mode 100644 index 85d496e777b607878e2e753870c3d17edbe9ac84..0000000000000000000000000000000000000000 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001235731706.gif and /dev/null differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001235732402.gif b/en/application-dev/quick-start/figures/en-us_image_0000001235732402.gif deleted file mode 100644 index 52c44c8b2924878e6fc1156039a815b266dfcfae..0000000000000000000000000000000000000000 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001235732402.gif and /dev/null differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001235745716.png b/en/application-dev/quick-start/figures/en-us_image_0000001235745716.png deleted file mode 100644 index d42c9c66018ee55f3c200ff108fb0a77b6c82df3..0000000000000000000000000000000000000000 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001235745716.png and /dev/null differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001235892798.png b/en/application-dev/quick-start/figures/en-us_image_0000001235892798.png deleted file mode 100644 index a1ac0507eae1ecbc825075ef08c09e01b4f4858e..0000000000000000000000000000000000000000 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001235892798.png and /dev/null differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001277489017.png b/en/application-dev/quick-start/figures/en-us_image_0000001277489017.png new file mode 100644 index 0000000000000000000000000000000000000000..c659e54584bf8e78543facc3a1b3f821a6a9571f Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001277489017.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001280255513.gif b/en/application-dev/quick-start/figures/en-us_image_0000001277608817.gif similarity index 50% rename from en/application-dev/quick-start/figures/en-us_image_0000001280255513.gif rename to en/application-dev/quick-start/figures/en-us_image_0000001277608817.gif index 59d7dffeadc05a792920a481cdf2e2422147434f..c7a7ddefaee51083d2e93cd997da7a723da4dc48 100644 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001280255513.gif and b/en/application-dev/quick-start/figures/en-us_image_0000001277608817.gif differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001277809361.gif b/en/application-dev/quick-start/figures/en-us_image_0000001277809361.gif new file mode 100644 index 0000000000000000000000000000000000000000..8fb36b48063470e5bb444e5325fa3ffac688a6bf Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001277809361.gif differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001280383937.gif b/en/application-dev/quick-start/figures/en-us_image_0000001280383937.gif deleted file mode 100644 index 28a648445a7936a190fa3b129489c68dea97f963..0000000000000000000000000000000000000000 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001280383937.gif and /dev/null differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001280385809.png b/en/application-dev/quick-start/figures/en-us_image_0000001280385809.png deleted file mode 100644 index 9b93b35e975769a97c817a70f55908452768101a..0000000000000000000000000000000000000000 Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001280385809.png and /dev/null differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311015192.png b/en/application-dev/quick-start/figures/en-us_image_0000001311015192.png new file mode 100644 index 0000000000000000000000000000000000000000..12978dc861aaa1f826404d9c6838bb8628381615 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311015192.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311175120.png b/en/application-dev/quick-start/figures/en-us_image_0000001311175120.png new file mode 100644 index 0000000000000000000000000000000000000000..12978dc861aaa1f826404d9c6838bb8628381615 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311175120.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311175132.png b/en/application-dev/quick-start/figures/en-us_image_0000001311175132.png new file mode 100644 index 0000000000000000000000000000000000000000..2f401b2f8aa84e89bdef25bcf615ff1a621ab6d6 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311175132.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311334932.png b/en/application-dev/quick-start/figures/en-us_image_0000001311334932.png new file mode 100644 index 0000000000000000000000000000000000000000..42b475577bcc805372336be8971afa5c69c284bd Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311334932.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311334944.png b/en/application-dev/quick-start/figures/en-us_image_0000001311334944.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce82237297b06c04113d0368d7145661de0d997 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311334944.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311334972.png b/en/application-dev/quick-start/figures/en-us_image_0000001311334972.png new file mode 100644 index 0000000000000000000000000000000000000000..6499d0b2de7ee290b958059d13d9d19995e0e511 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311334972.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311334976.png b/en/application-dev/quick-start/figures/en-us_image_0000001311334976.png new file mode 100644 index 0000000000000000000000000000000000000000..7891c03e8fab1eaaf6159964fc338e0be9bb080a Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311334976.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311494580.png b/en/application-dev/quick-start/figures/en-us_image_0000001311494580.png new file mode 100644 index 0000000000000000000000000000000000000000..6c1ea01d448434e7cfd94e174474e72b57d3b4cc Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311494580.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311494592.png b/en/application-dev/quick-start/figures/en-us_image_0000001311494592.png new file mode 100644 index 0000000000000000000000000000000000000000..a88a2ec512c0fa4f374d1e9ac03a27c717aeab58 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311494592.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001311494604.png b/en/application-dev/quick-start/figures/en-us_image_0000001311494604.png new file mode 100644 index 0000000000000000000000000000000000000000..6c1ea01d448434e7cfd94e174474e72b57d3b4cc Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001311494604.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001363934577.png b/en/application-dev/quick-start/figures/en-us_image_0000001363934577.png new file mode 100644 index 0000000000000000000000000000000000000000..6499d0b2de7ee290b958059d13d9d19995e0e511 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001363934577.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001363934589.png b/en/application-dev/quick-start/figures/en-us_image_0000001363934589.png new file mode 100644 index 0000000000000000000000000000000000000000..2f401b2f8aa84e89bdef25bcf615ff1a621ab6d6 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001363934589.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364054485.png b/en/application-dev/quick-start/figures/en-us_image_0000001364054485.png new file mode 100644 index 0000000000000000000000000000000000000000..6c1ea01d448434e7cfd94e174474e72b57d3b4cc Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364054485.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364054489.png b/en/application-dev/quick-start/figures/en-us_image_0000001364054489.png new file mode 100644 index 0000000000000000000000000000000000000000..a69b0c6f3b047e5961b05b40b663ce972a90b459 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364054489.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364173989.png b/en/application-dev/quick-start/figures/en-us_image_0000001364173989.png new file mode 100644 index 0000000000000000000000000000000000000000..f4b6f516a8340914c41600ef24012dd3699648b6 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364173989.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364174013.png b/en/application-dev/quick-start/figures/en-us_image_0000001364174013.png new file mode 100644 index 0000000000000000000000000000000000000000..12978dc861aaa1f826404d9c6838bb8628381615 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364174013.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364254729.png b/en/application-dev/quick-start/figures/en-us_image_0000001364254729.png new file mode 100644 index 0000000000000000000000000000000000000000..7fba7aab32a92752b341af024ef97e5acfe3d73d Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364254729.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364254741.png b/en/application-dev/quick-start/figures/en-us_image_0000001364254741.png new file mode 100644 index 0000000000000000000000000000000000000000..fbbde9923a131d3ab69257b28cfe33ca2a1040cf Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364254741.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001364254773.png b/en/application-dev/quick-start/figures/en-us_image_0000001364254773.png new file mode 100644 index 0000000000000000000000000000000000000000..6499d0b2de7ee290b958059d13d9d19995e0e511 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001364254773.png differ diff --git a/en/application-dev/quick-start/start-overview.md b/en/application-dev/quick-start/start-overview.md index 6f5bcb31545c055124156a366eea31e19f91c8c4..6676177531b6a2aaeac7ffcac59ab3a586b5656c 100644 --- a/en/application-dev/quick-start/start-overview.md +++ b/en/application-dev/quick-start/start-overview.md @@ -1,12 +1,12 @@ # Preparations -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 pages. The following figure shows how the pages look on the DevEco Studio Previewer. +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_0000001261809595](figures/en-us_image_0000001261809595.png) +![en-us_image_0000001364254729](figures/en-us_image_0000001364254729.png) -Before you begin, there are some basic concepts that will help you better understand OpenHarmony: UI framework and ability. +Before you begin, there are two basic concepts that will help you better understand OpenHarmony: UI framework and ability. ## Basic Concepts @@ -14,37 +14,39 @@ Before you begin, there are some basic concepts that will help you better unders ### UI Framework -OpenHarmony provides a UI development framework, known as ArkUI. ArkUI provides capabilities you may need for application UI development, including a wide array of components, layout calculation, animation, UI interaction, and drawing capabilities. +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: JavaScript-based web-like development paradigm (web-like development paradigm for short) and TypeScript-based declarative development paradigm (declarative development paradigm for short). You can choose whichever development paradigm that aligns with your practice. -| **Development Paradigm** | **Language** | **UI Update Mode** | **Applicable To** | **Intended Audience** | +| **Development Paradigm**| **Programming Language**| **UI Update Mode**| **Applicable To**| **Intended Audience**| | -------- | -------- | -------- | -------- | -------- | -| Web-like development paradigm | JavaScript | Data-driven | Applications and service widgets with simple UIs | Frontend web developers | -| Declarative development paradigm | Extended TypeScript (eTS) | Data-driven | Applications involving technological sophistication and teamwork | Mobile application and system application developers | +| Declarative development paradigm| Extended TypeScript (eTS)| 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 DevEco Studio V2.2 Beta1 and later versions, both the traditional coding mode and the low-code mode are supported when the JS language is used for development. +For more details, see [UI Development](../ui/arkui-overview.md). -For eTS language development, DevEco Studio V3.0 Beta3 and later versions support low-code development in addition to the traditional code development mode. -On the OpenHarmony low-code development pages, you can design your application UI in an efficient, intuitive manner, with a wide array of UI editing features. +### Ability +An ability is the abstraction of a functionality that an application can provide. An application may provide various capabilities, and so it can have multiple abilities. These abilities can be deployed together or independently from each other. -### Ability +The ability framework model has two forms: + +- **FA model**: applies to application development using API version 8 and earlier versions. For details, see [FA Model Overview](../ability/fa-brief.md). -An ability is an abstraction of a capability that an application can provide. The **Ability** class is an essential component to OpenHarmony applications. An application may provide various capabilities, and so it can have multiple abilities. These abilities can be deployed together or independently from each other. +- **Stage model**: introduced since API version 9. For details, see [Stage Model Overview](../ability/stage-brief.md). -Abilities are classified into two types: [Feature Ability (FA)](../../glossary.md#f) and [Particle Ability (PA)](../../glossary.md#p). Each type has their respective templates for different capabilities. FAs support only the Page template (also called the [Page ability](../ability/fa-pageability.md)), which is used to provide the capability of interacting with users. A Page ability consists of one or more pages. The figure below shows the relationship between a Page ability and pages. +The project directory structure of the FA model is different from that of the stage model. The stage model only works with the eTS programming language. -![en-us_image_0000001215206886](figures/en-us_image_0000001215206886.png) +For details about the differences between the FA model and stage model, see [Ability Framework Overview](../ability/ability-brief.md). -This document provides a Page ability instance with two pages. For more information about ability development, see [Ability Development](../ability/ability-brief.md). +This document provides an ability with two pages. For more information about ability development, see [Ability Development](../ability/ability-brief.md). ## Tool Preparation -1. Install the latest version of [DevEco Studio](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta_openharmony). +1. Download the latest version of [DevEco Studio](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta). -2. Install DevEco Studio and configure the development environment. For details, see [Configuring the OpenHarmony SDK](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-setting-up-environment-0000001263160443). +2. Install DevEco Studio and configure the development environment. For details, see [Setting Up the Development Environment](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-setting-up-environment-0000001263160443). -When you are done, follow the instructions in [Getting Started with eTS in the Traditional Coding Approach](start-with-ets.md), [Getting Started with eTS in the Low-Code Approach](start-with-ets-low-code.md), [Getting Started with JavaScript in the Traditional Coding Approach](start-with-js.md), and [Getting Started with JavaScript in the Low-Code Approach](start-with-js-low-code.md). +When you are done, follow the instructions in [Getting Started with eTS in Stage Model](start-with-ets-stage.md), [Getting Started with eTS in FA Model](start-with-ets-fa.md), and [Getting Started with JavaScript in FA Model](../quick-start/start-with-js-fa.md). diff --git a/en/application-dev/quick-start/start-with-ets-fa.md b/en/application-dev/quick-start/start-with-ets-fa.md new file mode 100644 index 0000000000000000000000000000000000000000..8eacd7eedaf4fd795ee14c378484298398ef0b63 --- /dev/null +++ b/en/application-dev/quick-start/start-with-ets-fa.md @@ -0,0 +1,299 @@ +# Getting Started with eTS in FA Model + + +> **NOTE** +> +> To use eTS, your DevEco Studio must be V3.0.0.601 Beta1 or later. +> +> For best possible results, use [DevEco Studio V3.0.0.991 Beta4](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta) for your development. + + +## Creating an eTS Project + +1. If you are opening DevEco Studio for the first time, click **Create Project**. If a project is already open, choose **File** > **New** > **Create Project** from the menu bar. On the **OpenHarmony** tab of the **Choose Your Ability Template** page, select **Empty Ability** and click **Next**. + + ![01](figures/01.png) + +2. In the project configuration page, set **Compile SDK** to **8** or **9** (in the latter case, you also need to set **Model** to **FA**) and **Language** to **eTS** and retain the default values for other parameters. + + ![02](figures/02.png) + + > **NOTE** + > + > If you are using DevEco Studio V3.0 Beta3 or later, you can use the [low-code development](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-low-code-development-0000001218440652) mode apart from the traditional coding approach. + > + > On the low-code development pages, you can design your application UI in an efficient, intuitive manner, with a wide array of UI editing features. + > + > To use the low-code development mode, turn on **Enable Super Visual** on the page shown above. + +3. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created. + + +## eTS Project Directory Structure + +- **entry**: OpenHarmony project module, which can be built into an OpenHarmony Ability Package ([HAP](../../glossary.md#hap)). + - **src > main > ets**: a collection of eTS source code. + - **src > main > ets > MainAbility**: entry to your application/service. + - **src > main > ets > MainAbility > pages**: pages contained in **MainAbility**. + - **src > main > ets > MainAbility > pages > index.ets**: the first page in the **pages** list, also referred to as the entry to the application. + - **src > main > ets > MainAbility > app.ets**: ability lifecycle file. + - **src > main > resources**: a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files. For details about resource files, see [Resource File Categories](../ui/ui-ts-basic-resource-file-categories.md). + - **src > main > config.json**: module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file. For details about the configuration file, see [Application Package Structure Configuration File (FA Model)](package-structure.md). + - **build-profile.json5**: current module information and build configuration options, including **buildOption** and **targets**. + - **hvigorfile.js**: module-level compilation and build task script. You can customize related tasks and code implementation. + +- **build-profile.json5**: application-level configuration information, including the signature and product configuration. + +- **hvigorfile.js**: application-level compilation and build task script. + + +## Building the First Page + +1. Use the **\** component. + + After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **MainAbility** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **\** component. The sample code in the **index.ets** file is shown below: + + + ```ts + // index.ets + @Entry + @Component + struct Index { + @State message: string = 'Hello World' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } + } + ``` + +2. Add a **\