The sap.ui.base.Object
is the base class for all SAPUI5 objects.
This class can be used, for example, to organize coding from the view controller and encapsulate it. This way you can create reusable classes for other SAPUI5 apps.
Template
sap.ui.define([ "sap/ui/base/Object" ], function(UI5Object) { "use strict"; return UI5Object.extend("<PROJECT_PATH>.control.<NAME>", { /** * @class <NAME> * @summary <SUMMARY> * @extends sap.ui.base.Object */ constructor: function() { UI5Object.apply(this); }, /** * @memberOf <NAME> * @description getXYZ * @public */ getXYZ: function() { //do sth. } }); });
Related Information
- Check out the blog posts from Wouter Lemaire on this topic:
- 🧐 When the “empty shell” of the
sap.ui.base.Object
is not enough and more functionality is needed check out How to extend a sap.ui.base.ManagedObject