Skip to Content

SAP UI5 component concept

Hi Experts,

Other day I was going through the 'application best practices' section in developer guideĀ  and under step 2 i saw they were talking about SAPUi5 components. i went through the SAPUI5 component section in developer guide later. Even though I understood little bit of what it is,i did not get answers to below questions

- Why is it a best practice to use component concept when building SAPUI5 applications? Is there any added advantage when we use components or is it just a guideline?

- I also read that we can reuse the components in other applications like we do in ABAP WD? can anybody give me a simple example for this or point me to any source where I can find this?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 09, 2015 at 09:43 AM

    HI Sankara,

    For understanding components I would recommend reading the following documentation :

    And then think of it in terms of Fiori Applications. The basic concept is of reusablilty . Once you develop using the Component approach , then the application can also exist in a broader scope also .

    In case of Firoi apps, this broader scope would be a launchpad which provides access to different applications like Timesheet , Purchase Order, Travel Request etc.(These applications are basically different Components).

    I hope this is helpful.


    Mayank Jain

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Mayank,

      i have gone through that doc. The information is same as in developer guide. But thanks for explaining this in fiori point of view. can you give me an example like creating on simple component and reusing it in another application?



  • Jan 09, 2015 at 05:49 AM

    Hi Sankara,

    In Step 1 of the Developer Guide, in index.html there is a shell within which we need to mention Component Container and in the name property of the app in the shell. Look at the Resources and Namespaces of the Step 1:Index

    Hope this helps


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10, 2015 at 05:27 AM

    hi Experts,

    Any help here?

    Add comment
    10|10000 characters needed characters exceeded

    • HI Sankara

      Component is an encapsulation of the resources for a control.

      You may run into issue where I have css and images for my control If you have created one. You can add it to your application css and resource folders for them respectively. But then if you are going to reuse or share it in other projects. You have to explicitly copy these css and images to the new projects.

      With Component, since all the javascript files, css, images are encapsulated into one folder, it makes it easier to share it.

      This is based on my understanding.