harmony 鸿蒙Model Switching Overview

  • 2023-02-03
  • 浏览 (394)

Model Switching Overview

Perform the following operations to switch a declarative paradigm-based application developed based on the FA model to the stage model.

  • Project switch: Create an application project of the stage model.

model-switch-overview1

model-switch-overview2

  • Component switch: Switch the PageAbility, ServiceAbility, and DataAbility components of the FA model to the UIAbility and ExtensionAbility components of the stage model. The figure below shows only the switching from PageAbility to UIAbility. The left part is the FA model, and app.ets is the PageAbility component. The right part is the stage model, and EntryAbility.ets is the UIAbility component.

model-switch-overview3

  • Widget switch: Switch the FormAbility component of the FA model to the FormExtensionAbility component of the stage model. In the figure below, Service Widget is FormAbility in the FA model and FormExtensionAbility in the stage model.

model-switch-overview4

model-switch-overview5

  • API switch: Switch the APIs with the FAModelOnly tag used in the FA model to the recommended APIs in the stage model.

model-switch-overview6

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Application Models

harmony 鸿蒙Using Explicit Want to Start an Application Component

harmony 鸿蒙Using Implicit Want to Open a Website

harmony 鸿蒙AbilityStage Component Container

harmony 鸿蒙Accessing a DataAbility

harmony 鸿蒙Accessing a DataShareExtensionAbility from the FA Model

harmony 鸿蒙AccessibilityExtensionAbility

harmony 鸿蒙Common action and entities Values

harmony 鸿蒙API Switching Overview

harmony 鸿蒙Switching of app and deviceConfig

0  赞