Skip to content
This repository was archived by the owner on Nov 13, 2021. It is now read-only.

Commit bd80761

Browse files
committed
remove ui maint in mta.yaml from ex09, do in ex10
1 parent 51f10d9 commit bd80761

File tree

1 file changed

+8
-67
lines changed

1 file changed

+8
-67
lines changed

exercises/09/readme.md

Lines changed: 8 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -38,68 +38,9 @@ If there isn't anything that can be sensibly served in the `app/` directory it w
3838
![title in browser tab](title-in-browser-tab.png)
3939

4040

41-
### 2. Add a new module to the project descriptor
41+
### 2. Add a Fiori sandbox environment to the UI index page
4242

43-
This new `app/` directory contains all UI files and represents a new module in the context of what we're eventually going to deploy to the SAP Cloud Platform.
44-
45-
For this to work and be included in what we eventually deploy and run, we must add information to the main deployment descriptor file `mta.yaml` that holds information relating to this.
46-
47-
:point_right: Replace the content of your `mta.yaml` file with the following lines. (Basically only the `bookshop-ui` module was added, but the formatting of `yaml` files is very unforgiving, so just copy / paste the entire content from here and replace everything, to keep things simple!)
48-
```
49-
_schema-version: 2.0.0
50-
ID: bookshop
51-
version: 1.0.0
52-
modules:
53-
- name: bookshop-db
54-
type: hdb
55-
path: db
56-
parameters:
57-
memory: 256M
58-
disk-quota: 256M
59-
requires:
60-
- name: bookshop-db-hdi-container
61-
- name: bookshop-srv
62-
type: nodejs
63-
path: srv
64-
parameters:
65-
memory: 512M
66-
disk-quota: 256M
67-
provides:
68-
- name: srv_api
69-
properties:
70-
url: ${default-url}
71-
requires:
72-
- name: bookshop-db-hdi-container
73-
- name: bookshop-ui
74-
type: nodejs
75-
path: app
76-
parameters:
77-
memory: 256M
78-
disk-quota: 256M
79-
requires:
80-
- name: srv_api
81-
group: destinations
82-
properties:
83-
forwardAuthToken: true
84-
strictSSL: true
85-
name: srv_api
86-
url: ~{url}
87-
resources:
88-
- name: bookshop-db-hdi-container
89-
type: com.sap.xs.hdi-container
90-
properties:
91-
hdi-container-name: ${service-name}
92-
parameters:
93-
service: hana
94-
95-
```
96-
97-
This snippet not only describes the runtime environment of the new module, it also injects the URL of the deployed `srv` module during deploy time.
98-
99-
100-
### 3. Add a Fiori sandbox environment to the UI index page
101-
102-
Let's now get back to the HTML in the `index.html` file. To create a sandbox Fiori launchpad we'll need the UI5 runtime as well as artefacts from the `test-resources` area of the toolkit.
43+
Let's now add a bit more to the contents of the `index.html` file. To create a sandbox Fiori launchpad we'll need the UI5 runtime as well as artefacts from the `test-resources` area of the toolkit.
10344

10445
> While you have `cds watch` running, you may notice that it's not looking out for changes to HTML files, but that doesn't actually matter, as with HTML changes, the server doesn't need to be restarted. So you can make these following changes and simply switch over to the browser to refresh.
10546
@@ -143,7 +84,7 @@ Reloading the browser tab should now show the beginnings of something recognizab
14384

14485
![an empty Fiori launchpad](empty-fiori-launchpad.png)
14586

146-
### 4. Introduce a basic UI app to the Fiori launchpad
87+
### 3. Introduce a basic UI app to the Fiori launchpad
14788

14889
Now we have the launchpad as a container for our app, let's introduce it gradually.
14990

@@ -173,7 +114,7 @@ Reloading the index page in the browser should show something like this:
173114
![Fiori launchpad with tile](launchpad-with-tile.png)
174115

175116

176-
### 5. Create the app artefacts
117+
### 4. Create the app artefacts
177118

178119
As we can see from the configuration we've just added, we're suggesting the app is a Component-based app (where the component name is "bookshop") and is to be found at (relative) URL `/webapp`. Let's flesh that out in terms of directories and files now.
179120

@@ -292,7 +233,7 @@ Now you can open the "Browse Books" app and see the beginnings of a list report.
292233

293234
![empty table](empty-table.png)
294235

295-
### 6. Create a CDS index file
236+
### 5. Create a CDS index file
296237

297238
This is the point where you can introduce an `index.cds` file which controls which services are exposed.
298239

@@ -305,7 +246,7 @@ using from './service';
305246
> At this point you can actually reload the UI; while you will see some semblance of an app when you select the tile in the launchpad, the app's display will be mostly empty.
306247
307248

308-
### 7. Add annotations for the service
249+
### 6. Add annotations for the service
309250

310251
Now let's look at important content that will help us join together in our minds the two complementary worlds of CAP and Fiori. This content is to be added to `index.cds` and controls what gets served to Fiori frontends, via annotations that form a rich layer of metadata over the top of the service.
311252

@@ -348,7 +289,7 @@ annotate CatalogService.Authors with {
348289
> You may see some warnings that there are no texts for the internationalization (i18n) identifiers. We'll fix this shortly, you can ignore the warnings for now.
349290
350291

351-
### 8. Test the app
292+
### 7. Test the app
352293

353294
The app should be ready to invoke. Reload the Fiori launchpad and select the tile. It should open up into a nice List Report style Fiori Elements app - all driven from the service's annotations:
354295

@@ -357,7 +298,7 @@ The app should be ready to invoke. Reload the Fiori launchpad and select the til
357298
Well done!
358299

359300

360-
### 9. Add base internationalization texts
301+
### 8. Add base internationalization texts
361302

362303
Just to round things off, add some i18n texts - they're referred to in various annotation sections, and it will make the app look a little more polished.
363304

0 commit comments

Comments
 (0)