Extending SAPUI5 Application

In this tutorial, you will learn one or two things about extending apps in sapui5. So what does extending apps in sapui5 mean? Well to answer this, let me just tell you there are some standard fiori apps provided by SAP (for e.g. - one of the app is track Sales order). Now there might be a case, where “some functionalities” a particular customer would want apart from the functionalities provided by SAP in those applications. So in that case, the customer would need to make another custom application, having same functionalities that are provided in the particular standard fiori app (just copy the standard app to this custom app). And then the customer would add the particular functionalities that he/she likes in the custom application. 

So to provide these extensions, it is needed to provide some extension points in the application, which we will be taking a look in this tutorial. So here I will tell you the basics of extending apps in sapui5, also I will provide examples, so that this topic will be cleared. 

So, extending SAPUI5 applications supports customers and partners in adapting the SAPUI5 standard application to their specific requirements. For example, you can adapt or replace views, extend or replace controllers, or change language-specific texts. If you want to customize the application, you would be required to configure your component.js file. There is a specific section in the component.js file named as “customizing”. Such a customization can be performed on a custom application that extends a delivered standard application. A replacement or extension of views and custom controllers can also be part of a custom application, but may not always be required. If no replacement and no custom controller exist, the custom application project only contains the component definition with the customization configuration.

The point to note here is that there is no change made to the standard application, the custom app is actually the copy of the standard project, where some additional customization are done.

SAPUI5 supports the following adaptations of the standard:

1) View extensions by using extension points to insert custom content (views or fragments)
2) Replacing standard views with custom-developed views
3) Modifying views by changing specific properties of controls
4) Controller extensions by adding code or overriding existing code
5) Customizing i18n resource texts
6) Adding new views
7) Adding new navigation paths
8) Customizing navigation routes

So, here I have divided the tutorials into sets, so that things won’t be complicated. So follow step by step tutorials, for a better understanding.

To handle localized text while extending apps, follow the tutorial:

To configure component.js file according to the extension, follow this tutorial:

To extend a view, follow the tutorial:

For tutorial on view modification or view replacement, follow the blog:

For tutorial on controller extension, follow the blog:

For tutorial on controller hooks, follow this blog:

Next Post »