Skip to content

Commit

Permalink
Improve manifest information (#93)
Browse files Browse the repository at this point in the history
* update: manifest version

* fix: manifest version

* improve: manifest descriptions

* add reference to Lib.load

* Update Readme 1 & 10 based on feedback
  • Loading branch information
margopolo authored Jan 17, 2025
1 parent 3959013 commit 22d6b89
Show file tree
Hide file tree
Showing 35 changed files with 108 additions and 100 deletions.
32 changes: 18 additions & 14 deletions steps/01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,31 @@ In our webapp folder, we create a new HTML file named `index.html` and copy the

### webapp/manifest.json \(New\)

The manifest file, also known as the "descriptor" or "app descriptor," serves as a crucial configuration file for applications, components, and libraries. Stored in the `webapp` folder, this file is read by OpenUI5 to instantiate a component. Although we haven't created a component yet (which is part of [Step 9: Component Configuration](../09/README.md)), we need to create the app descriptor now because the UI5 Tooling we intend to use for development also requires it.
The manifest serves as a crucial configuration file for applications, components, and libraries. For applications, the manifest file is stored in the `webapp` folder and is read by OpenUI5 to instantiate a component. Although we haven't created a component yet (which is part of [Step 9: Component Configuration](../09/README.md)), creating the manifest now is necessary due to the UI5 Tooling requirements for development.

Hence, we create a new file called `manifest.json` in the webapp folder and define its essential attributes:
Let's start by creating a new file named `manifest.json` in the webapp folder and define its essential attributes:

- The `_version` attribute is a mandatory field in the app descriptor that indicates the format version of the descriptor. This attribute is crucial for identifying application settings when the descriptor is read by various tools. As new features or changes are introduced in future versions of the descriptor, the version number helps ensure compatibility and proper interpretation of the descriptor's contents. Consequently, with each new version of OpenUI5 a corresponding version of the app descriptor is released. For this tutorial, we have determined that our app requires a minimum OpenUI5 version of 1.120. Therefore, we specify the descriptor format version as 1.60.0, aligning it with the appropriate OpenUI5 version.
- The `_version` attribute in the root is mandatory in the manifest. It indicates the format version of the manifest, which is crucial for identifying application settings whenever the file is read by various tools. As new features or changes are introduced in future versions, maintaining the correct version number ensures compatibility and precise interpretation of the manifest's contents.

> 💡 **Tip:** <br>
> To find the appropriate `_version` for each OpenUI5 release, see [Descriptor for Applications, Components, and Libraries \(manifest.json\)](httsp://sdk.openui5.org/topic/be0cf40f61184b358b5faedaec98b2da.html).
Since we want our app to support not only the latest OpenUI5 version but rather the latest long-term maintenance version, which is OpenUI5 1.120, we set the format version to `1.60.0`.

- The **`sap.app`** namespace is used to define properties that are specific to the application itself. It includes the following obligatory application-specific attributes:
> 📝 **Note:** <br>
> The manifest version should not necessarily align directly with the OpenUI5 version being used. Instead, choose the descriptor version that matches the requirements or supports the features you intend to use in your application.
To find the appropriate `_version` for each OpenUI5 release, refer to [Descriptor for Applications, Components, and Libraries \(manifest.json\)](https://sdk.openui5.org/topic/be0cf40f61184b358b5faedaec98b2da.html) or the [mapping.json](https://github.com/SAP/ui5-manifest/blob/main/mapping.json) file of the [ui5-manifest](https://github.com/SAP/ui5-manifest/) project.

- `id`: This property specifies a unique identifier for the application and states the namespace of the application.
It's used to identify the application within the SAP Fiori launchpad or any other deployment environment.
The id has to be provided in dot notation and must not exceed 70 characters.
- The **`sap.app`** namespace defines properties specific to the application. It includes the following required attributes:

- `title`: This property defines the title of the application, which can be displayed in the SAP Fiori launchpad or other application management tools.
- `id`: This specifies an identifier for the application. It is provided in dot notation and is limited to 70 characters. It must be unique and must correspond to the component ID/namespace.

> 📝 **Note:** <br>
> It's recommended to make the title language-dependent, although for now we will use a static title. We'll discuss how to implement language-dependent titles in [Step 10: Descriptor for Applications](../10/README.md).
- `type`: This property defines the nature of the project and specifies whether it is an `application`, `component`, `library`, or `card`. It provides a clear classification, helping to identify the project's purpose and ensuring the correct loading and handling of the project within the system.

- `title`: This defines the title of the application, which appears in application management tools like the SAP Fiori launchpad.

- `applicationVersion`: This property is used to specify the version of the application. It's typically used for tracking and managing changes to the application over time. The application version must be provided using semantic versioning principles.
> 📝 **Note:** <br>
> It is advisable to make the title language-dependent. We'll cover implementing language-dependent titles in [Step 10: Manifest (Descriptor for Applications)](../10/README.md), but for now we'll use a static title.
- `type`: This property defines the type of the project, such as `application` or `component`. It helps in determining the application's behavior and how it should be loaded. While the type is actually not a mandatory attribute, it provides a useful project description; hence, it makes sense to conigure it as well. We describe an `application`.
- `applicationVersion`: This is used to denote the version of the application using semantic versioning principles. It's typically used for tracking and managing changes to the application over time.

```json
{
Expand Down Expand Up @@ -166,6 +168,8 @@ This will open a new browser window hosting your newly created `index.html`.

[Descriptor for Applications, Components, and Libraries \(manifest.json\)](https://sdk.openui5.org/topic/be0cf40f61184b358b5faedaec98b2da.html "The descriptor for applications, components, and libraries (in short: app descriptor) is inspired by the WebApplication Manifest concept introduced by the W3C. The descriptor provides a central, machine-readable, and easy-to-access location for storing metadata associated with an application, an application component, or a library.")

[ui5-manifest](https://github.com/SAP/ui5-manifest/tree/main)

[Development Environment](https://sdk.openui5.org/topic/7bb04e05f9484e1b95b38a2e48ecef4f.html "This part of the documentation introduces you to some common and recommended use cases for the installation, configuration, and setup of OpenUI5 development environments.")

[App Development](https://sdk.openui5.org/topic/b1fbe1a22f8d4a5bbb601591e27b68d1 "There are several ways to develop OpenUI5 applications. Select the one that meets the requirements of your projects and your expectations best.")
Expand Down
2 changes: 1 addition & 1 deletion steps/09/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ new ComponentContainer({

***

**Next:** [Step 10: Descriptor for Applications](../10/README.md "All application-specific configuration settings will now further be put in a separate descriptor file called manifest.json. This clearly separates the application coding from the configuration settings and makes our app even more flexible. For example, all SAP Fiori applications are realized as components and come with a descriptor file in order to be hosted in the SAP Fiori launchpad.")
**Next:** [Step 10: Manifest (Descriptor for Applications)](../10/README.md "All application-specific configuration settings will now further be put into the manifest. This clearly separates the application coding from the configuration settings and makes our app even more flexible.")

**Previous:** [Step 8: Translatable Texts](../08/README.md "In this step we move the texts of our UI to a separate resource file.")

Expand Down
Loading

0 comments on commit 22d6b89

Please sign in to comment.