SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.92k stars 1.23k forks source link

Documentation of sap/ui/core/Core should better explain how to use the Core. #4031

Closed codeworrior closed 2 months ago

codeworrior commented 2 months ago

OpenUI5 version: most recent versions.

The API reference as well as the bootstrap documentation fail to explain that the sap/ui/core/Core module returns an object, not a class.

Many code samples in the SDK use the legacy global API sap.ui.getCore(), but I couldn't find a place that describes the module variant. Instead, documentation talks from the Core as a class in several places. To avoid confusion, it should be mentioned more clearly that one must not create instances of the class, but rather should use the module export of sap/ui/core/Core.

Also see https://github.com/SAP/ui5-typescript/issues/443.

NHristov-sap commented 2 months ago

Hi @codeworrior ,

Thank you for sharing this finding. I've created an internal incident DINC0132061. The status of the issue will be updated here in GitHub.

Best Regards, Nikolay Hristov UI5 GitHub Dispatcher