Q:

SAP UI5 embed manifest.json right

I just wrote the description file for my UI5 application. 
Now I have these questions: 

Where and how can I embed the manifest.json in my project correctly?
How can I test if it's working fine? (correctly embedded)
Is the "start_url": "" similar to initialPage of the index.html?

Many thanks for your guidance,
Chris

A:

Usually, the manifest.json file  (aka. "Application Descriptor") is put into the same folder as where the Component.js file is located. The component will look for the file name "manifest.json" in the same folder. If the descriptor is located somewhere else or has a different file name, assign the relative URL of the file to the manifestUrl in the component factory function like this, which is recommended to do so anyway because it ...

loads the descriptor file before creating the component (same as manifestFirst) allowing us to preload dependencies and model data to improve the initial loading time.
makes specifying the name of the component redundant.  

You can either pass the name of the component or the URL of the descriptor file to load [the component] via the descriptor.

To see if the file is correctly embedded, run the app and see if e.g.

the rootView is loaded,
models (for example ResourceModel for i18n) are set to the component instance,
custom resources assigned to sap.ui5/resources are loaded, etc. etc..
→ Make sure to include (or in case of manifestFirst/ manifestUrl, don't be tempted to remove) manifest declaration in the component metadata.

The "start_url" is purely advisory and meant for the web standard rather than for UI5. It's telling the browser where to look for the initial page when the user starts the web app.

To learn more about the descriptor file, take a look at the developer guide such as "Descriptor for Applications" or as a summary, here.

