You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/documentation/docs/pages/Project.md
+33-30Lines changed: 33 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,20 +16,28 @@ Also see [UI5 Project: Configuration](./Configuration.md#general-configuration)
16
16
17
17
> **Note:** The term `component` as used in the UI5 CLI project type differs from the `sap.app/type` property in the `manifest.json` file at runtime. In most cases, a CLI project of type `component` is still a runtime "application". For details on the `sap.app/type` property in `manifest.json`, refer to the [manifest documentation](https://ui5.sap.com/#/topic/be0cf40f61184b358b5faedaec98b2da.html#loiobe0cf40f61184b358b5faedaec98b2da/section_sap_app).
18
18
19
-
Projects of the `component` type are typical component-like UI5 applications. They usually run in a container-like root application, such as the SAP Fiori launchpad (FLP) sandbox, alongside other UI5 applications.
19
+
Projects of the `component` type cover a range of use cases beyond typical standalone UI5 applications:
20
+
21
+
-**Application components:** These are typical UI5 applications, designed to run in container-like application such as the SAP Fiori launchpad (FLP). These generally inherit from `sap.ui.core.UIComponent` (or a subclass) and define the `manifest.json` property `sap.app/type: application`.
22
+
-**Reusable UI components:** Provide UI elements or features that can be embedded in different contexts. These typically inherit from `sap.ui.core.UIComponent` and define the `manifest.json` property `sap.app/type: component`.
23
+
-**Faceless components:** Provide functionality without a user interface. These are defined with `manifest.json` property `sap.app/type: component` and inherit from `sap.ui.core.Component` (not `UIComponent`).
24
+
25
+
Please also refer to the [components documentation](https://ui5.sap.com/#/topic/958ead51e2e94ab8bcdc90fb7e9d53d0) for more details.
20
26
21
27
To allow multiple component projects to coexist in the same environment, each project is served under its own namespace, for example `/resources/my/bookstore/admin`. In contrast, `application`-type projects act as root projects and are served at `/`, without a namespace.
22
28
23
-
By default, component projects use the same directory structure as library projects: they include `src` and `test` directories in the root. The integrated server uses both directories. However, when you build the project, the `test` directory is ignored because it shouldn't be deployed to production environments. Both directories can have either a flat or a namespace structure. If you use a flat structure, the project namespace derives from the `"sap.app".id` property in the `manifest.json`.
29
+
By default, component projects use the same directory structure as library projects: they include `src` and `test` directories in the root. Both directories can have either a flat or a namespace structure. If you use a flat structure, the project namespace derives from the `"sap.app".id` property in the `manifest.json`.
24
30
25
31
A component project must contain both, a `Component.js` and a `manifest.json` file.
26
32
27
33
Unlike `application`-type projects, component projects typically don't have dedicated `index.html` files in their regular resources (`src/`). However, you can still run them standalone. You can do this by using a dedicated HTML file located in their test resources or by declaring a development dependency to an application-type project that can serve the component, such as the FLP sandbox.
28
34
29
-
Component projects support all [output styles](./CLI.md#ui5-build) that library projects currently support. This allows a deployment where you can omit the namespace from the final directory structure using the output style: `flat`.
35
+
Component projects support all [output styles](#build-output-style) that library projects currently support. This allows a deployment where you can omit the namespace from the final directory structure using the output style: `flat`.
36
+
37
+
For more details, see also [RFC 0018 Component Type](https://github.com/UI5/cli/blob/rfc-component-type/rfcs/0018-component-type.md#rfc-0018-component-type).
30
38
31
39
### application
32
-
Projects of the `application` type typically serve as the main or root project. In a project's dependency tree, there should be only one project of this type. If the system detects additional application projects, it ignores those that are further away from the root.
40
+
Projects of the `application` type typically serve as the main or root project. In a project's dependency tree, there shouldn't be more than one project of this type. If the system detects additional application projects, it ignores those that are further away from the root.
33
41
34
42
The source directory of an application (typically named `webapp`) is mapped to the virtual root path `/`.
35
43
@@ -61,32 +69,27 @@ The _Output Style_ offers you control over your project's build output folder. N
61
69
62
70
In the table below you can find the available combinations of project type & output style.
|`Default`| Root project is written `Flat`-style. ^1^ |
68
-
|`Flat`| Same as `Default`. |
69
-
|`Namespace`| Root project is written `Namespace`-style (resources are prefixed with the project's namespace). ^1^ |
70
-
|**component**||
71
-
|`Default`| Root project is written `Namespace`-style. ^1^ |
72
-
|`Flat`| Root project is written `Flat`-style (without its namespace, logging warnings for resources outside of it). ^1^ |
73
-
|`Namespace`| Same as `Default`. |
74
-
|**library**||
75
-
|`Default`| Root project is written `Namespace`-style. ^1^ |
76
-
|`Flat`| Root project is written `Flat`-style (without its namespace, logging warnings for resources outside of it). ^1^ |
77
-
|`Namespace`| Same as `Default`. |
78
-
|**theme-library**||
79
-
|`Default`| Root project is written in the style of the sources (multiple namespaces). ^1^ |
80
-
|`Flat`|**Unsupported** ^2^ |
81
-
|`Namespace`|**Unsupported** ^2^ |
82
-
|**module**||
83
-
|`Default`| Root project is written with the [configured paths](https://ui5.github.io/cli/v5/pages/Configuration/#available-path-mappings). ^1^ |
84
-
|`Flat`|**Unsupported** ^3^ |
85
-
|`Namespace`|**Unsupported** ^3^ |
86
-
87
-
^1^ The Output Style is only applied to the root project's output folder structure. Any dependencies included in the build would retain their `Default` output style.
88
-
^2^ Theme libraries in most cases have more than one namespace.
89
-
^3^ Modules have explicit path mappings configured and no namespace concept.
|**component**|`Default`| Root project is written `Namespace`-style.¹ |
75
+
||`Flat`| Root project is written `Flat`-style (without its namespace, logging warnings for resources outside of it).¹ |
76
+
||`Namespace`| Same as `Default`. |
77
+
|**application**|`Default`| Root project is written `Flat`-style.¹ |
78
+
||`Flat`| Same as `Default`. |
79
+
||`Namespace`| Root project is written `Namespace`-style (resources are prefixed with the project's namespace).¹ |
80
+
|**library**|`Default`| Root project is written `Namespace`-style.¹ |
81
+
||`Flat`| Root project is written `Flat`-style (without its namespace, logging warnings for resources outside of it).¹ |
82
+
||`Namespace`| Same as `Default`. |
83
+
|**theme-library**|`Default`| Root project is written in the style of the sources (multiple namespaces).¹ |
84
+
||`Flat`|**Unsupported** ² |
85
+
||`Namespace`|**Unsupported** ² |
86
+
|**module**|`Default`| Root project is written with the [configured paths](https://ui5.github.io/cli/v5/pages/Configuration/#available-path-mappings).¹ |
87
+
||`Flat`|**Unsupported** ³ |
88
+
||`Namespace`|**Unsupported** ³ |
89
+
90
+
¹ The Output Style is only applied to the root project's output folder structure. Any dependencies included in the build would retain their `Default` output style.
91
+
² Theme libraries in most cases have more than one namespace.
92
+
³ Modules have explicit path mappings configured and no namespace concept.
0 commit comments