cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

want to know info in detail about Component.js in SAPUI5

sandeep_suggu
Contributor
0 Likes
1,476

HI SCN People,

New Learner to SAPUI5,

The code which gets generated needs to know the information of its usage & assigning.

Suggest with links which find helpful or any information.


Thank You,
Suggu Sandeep.

Accepted Solutions (0)

Answers (2)

Answers (2)

leonikussmaul
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Sandeep

According to the UI Component library in the SDK; "Components are independent and reusable parts of UI5 applications. They facilitate the encapsulation of closely related parts of an application, thus enabling developers to structure and maintain their applications more easily."

A lot of things that used to be defined in the Component.js are now handled by configuration in the manifest.json file, i.e. the Root View. Nevertheless, the component serves an important function as the starting point from where your application is run, while being independent of the index.html file and therefore allows your app to be used in more flexible environments such as the Fiori Launchpad.

Inside the component.js file, you import the UI Component from the library and pass it to a function, then return the UI Component and extend it. If you are just beginning with UI5, I would not worry about Components too much as they are usually configured automatically as you create your project and you can pick the topic up later on to avoid confusion.

I would strongly suggest going step by step through the walkthrough section of the SAPUI5 SDK, it is all explained very nicely there.

You can find the step referring to the Component.js Creation here: Walkthrough Step 9: Component Configuration.

The relative code for step 9 and all other steps: Component.js of Walkthrough in Samples

Also, this video series by SAP Developers does a really good job at running through the main concepts on a high level. The video below briefly mentions the Component.js as well.

Yogananda
Product and Topic Expert
Product and Topic Expert
0 Likes

sandeepsuggu

Its better to start from ui5.sap.com with explore feature which provides lot of examples...

There are SAP Press books where you can purchase to start learning ui5. Also there are lot of blogs written in blogs.sap.com and also tutorials in developers.sap.com