1e41f4b71Sopenharmony_ci# Switching of module
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ciWhen switching an application from the FA model to the stage model, migrate the configurations under **module** in the **config.json** file to **module** in the **module.json5** file.
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci**Table 1** module comparison
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci| Field Name in the FA Model| Field Description| Field Name in the Stage Model| Difference|
9e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
10e41f4b71Sopenharmony_ci| mainAbility | Ability displayed on the Service Center icon. When the resident process is started, the **mainAbility** is started.| mainElement | The field name is changed, and the stage mode does not use the period (.) in ability names.|
11e41f4b71Sopenharmony_ci| package | Package name of the HAP file, which must be unique in the application.| / | The stage model uses **name** to ensure application uniqueness. To ensure a successful switching from the FA model to the stage model, **name** in the stage model must be the same as **package** in the FA model.|
12e41f4b71Sopenharmony_ci| name | Class name of the HAP file.| / | This configuration is not enabled in the FA model, and the stage model does not have such a field.|
13e41f4b71Sopenharmony_ci| supportedModes | Modes supported by the application. Currently, only the **drive** mode is defined.| / | This configuration is deprecated in the stage model.|
14e41f4b71Sopenharmony_ci| moduleName in the distro object| Name of the current HAP file.<br>moduleName in the distro object.| name | The field name is changed.|
15e41f4b71Sopenharmony_ci| moduleType in the distro object| Type of the HAP file. The value can be **entry** or **feature**. For the HAR type, set this field to **har**.| type | The field name is changed.|
16e41f4b71Sopenharmony_ci| installationFree in the distro object| Whether the HAP file supports the installation-free feature.| installationFree | The field name is changed.|
17e41f4b71Sopenharmony_ci| deliveryWithInstall in the distro object| Whether the HAP file is installed with the application.| deliveryWithInstall | The field name is changed.|
18e41f4b71Sopenharmony_ci| metaData | Metadata of the HAP file.| metadata | For details, see Table 2.|
19e41f4b71Sopenharmony_ci| abilities | All abilities in the current module.| abilities | For details, see Table 5.|
20e41f4b71Sopenharmony_ci| js | A set of JS modules developed using ArkUI. Each element in the set represents the information about a JS module.| pages | The stage model retains **pages** under the **module** tag. The window configuration is the lower level of **pages**.|
21e41f4b71Sopenharmony_ci| shortcuts | Shortcuts of the application.| shortcut_config.json| In the stage model, the **shortcut_config.json** file is defined in **resources/base/profile** in the developer view.|
22e41f4b71Sopenharmony_ci| reqPermissions | Permissions that the application requests from the system when it is running.| requestPermissions | The field name is changed.|
23e41f4b71Sopenharmony_ci| colorMode | Color mode of the application.| / | This configuration is not supported in the stage model.|
24e41f4b71Sopenharmony_ci| distroFilter | Distribution rules of the application.| distributionFilter_config.json| In the stage model, the **distributionFilter_config.json** file is defined in **resources/base/profile** in the developer view.|
25e41f4b71Sopenharmony_ci| reqCapabilities | Device capabilities required for running the application.| / | This configuration is not supported in the stage model.|
26e41f4b71Sopenharmony_ci| commonEvents | Common events.| common_event_config.json| In the stage model, the **common_event_config.json** file is defined in **resources/base/profile** in the developer view.|
27e41f4b71Sopenharmony_ci| entryTheme | Keyword of an internal theme.| / | This configuration is not supported in the stage model.|
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci**Table 2** metaData comparison
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci| Field Name in the FA Model| Field Description| Field Name in the Stage Model| Difference|
33e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
34e41f4b71Sopenharmony_ci| parameters | Metadata of the parameters to be passed for calling the ability.| / | This configuration is not supported in the stage model.|
35e41f4b71Sopenharmony_ci| results | Metadata of the ability return value.| / | This configuration is not supported in the stage model.|
36e41f4b71Sopenharmony_ci| customizeData | Custom metadata of the parent component. **parameters** and **results** cannot be configured in **application**.| metadata | **For details**, see Table 3.|
37e41f4b71Sopenharmony_ci
38e41f4b71Sopenharmony_ci**Table 3** Comparison between customizeData under metaData in the FA model and metadata in the stage Model
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci| Field Name in the FA Model| Field Description| Field Name in the Stage Model| Difference|
41e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
42e41f4b71Sopenharmony_ci| name | Key name that identifies a data item. The value is a string with a maximum of 255 bytes.| name | None.|
43e41f4b71Sopenharmony_ci| value | Value of the data item. The value is a string with a maximum of 255 bytes.| value | None.|
44e41f4b71Sopenharmony_ci| extra | Format of the current custom data. The value is the resource value of **extra**.| resource | The field name is changed. For details, see Table 4.|
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci**Table 4** metaData examples
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci| Example in the FA Model| Example in the Stage Model|
50e41f4b71Sopenharmony_ci| -------- | -------- |
51e41f4b71Sopenharmony_ci| "meteData": {<br>    "customizeDate": [{<br>        "name": "label",<br>        "value": "string",<br>        "extra": "$string:label",<br>    }]<br>} | "meteData": [{<br>    "name": "label",<br>    "value": "string",<br>    "resource": "$string:label",<br>}] |
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci
54e41f4b71Sopenharmony_ci**Table 5** abilities comparison
55e41f4b71Sopenharmony_ci
56e41f4b71Sopenharmony_ci| Field Name Under abilities in the FA Model| Field Description| Field Name Under abilities in the Stage Model| Difference|
57e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
58e41f4b71Sopenharmony_ci| process | Name of the process running the application or ability.| / | The stage model does not support configuration of **process** under **abilities**. The configuration of **process** is available under the **module** tag.|
59e41f4b71Sopenharmony_ci| uri | URI of the ability.| / | This configuration is not supported in the stage model.|
60e41f4b71Sopenharmony_ci| deviceCapability | Device capabilities required to run the ability.| / | This configuration is not supported in the stage model.|
61e41f4b71Sopenharmony_ci| metaData | Metadata of the ability.| metadata | For details, see Table 2.|
62e41f4b71Sopenharmony_ci| type | Ability type.| / | This configuration is not supported in the stage model.|
63e41f4b71Sopenharmony_ci| grantPermission | Whether permissions can be granted to any data in the ability.| / | The stage model does not support such a configuration under **abilities**.|
64e41f4b71Sopenharmony_ci| readPermission | Permission required for reading data in the ability. This field applies only to the ability using the Data template.| / | In the stage model, this configuration is available under **extensionAbilities**, but not **abilities**.|
65e41f4b71Sopenharmony_ci| writePermission | Permission required for writing data to the ability.| / | In the stage model, this configuration is available under **extensionAbilities**, but not **abilities**.|
66e41f4b71Sopenharmony_ci| configChanges | System configurations that the ability concerns.| / | This configuration is not supported in the stage model.|
67e41f4b71Sopenharmony_ci| mission | Mission stack of the ability.| / | This configuration is not supported in the stage model.|
68e41f4b71Sopenharmony_ci| targetAbility | Target ability that this ability alias points to.| / | This configuration is not supported in the stage model.|
69e41f4b71Sopenharmony_ci| multiUserShared | Whether the ability supports data sharing among multiple users. This field applies only to the ability using the Data template.| / | This configuration is not supported in the stage model.|
70e41f4b71Sopenharmony_ci| supportPipMode | Whether the ability allows the user to enter the Picture in Picture (PiP) mode. The PiP mode enables the user to watch a video in a small window that hovers on top of a full screen window (main window).| / | This configuration is not supported in the stage model.|
71e41f4b71Sopenharmony_ci| formsEnabled | Whether the ability can provide widgets.| / | This configuration is not supported in the stage model.|
72e41f4b71Sopenharmony_ci| forms | Information about the widgets used by the ability. This field is valid only when **formsEnabled** is set to **true**.| form_config.json| In the stage model, the **form_config.json** file is defined in **resources/base/profile** in the developer view.|
73e41f4b71Sopenharmony_ci| srcLanguage | Programming language used to develop the ability.| / | This configuration is not supported in the stage model.|
74e41f4b71Sopenharmony_ci| srcPath | Path of the JS component code corresponding to the ability.| srcEntry | Path of the JS code corresponding to the ability.|
75e41f4b71Sopenharmony_ci| uriPermission | Application data that the ability can access.| / | This configuration is not supported in the stage model.|
76