Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
geert-janklaps
Active Contributor
If you're developing SAP CAP-based applications in combination SAPUI5 apps, you might already be familiar with the cds-launchpad-plugin. The plugin allows you to easily test all your apps in a single launchpad by automatically indexing all SAPUI5 projects in your workspace and providing the necessary configuration to a sandbox launchpad.

Recently the plugin has undergone some major changes, in this blog I'll guide you through the most important changes, how you can enable them & why they are beneficial to enable.

SAPUI5 strategy & direction


SAPUI5 is evolving fast and since recently there's official support for TypeScript (as of SAPUI5 1.116) using the UI5 Tooling. The future is even more bright with the release of SAPUI5 v2.0 which introduces the removal of deprecated API's (slimming down the library dramatically and thus improving the performance) and the move to Async API's only.


Future strategy of SAPUI5 announced at UI5con 2023 (credits stefan.beck & peter.muessig)


 

CAP Plugin technique


With the release of CAP 6.7.0 the new plugin technique was introduced. Up until a few weeks ago, the cds-launchpad-plugin still needed a custom server.js file to be activated. Luckily, smarten was kind enough to introduce the CAP plugin technique in the cds-launchpad-plugin.

This means you can now just install the plugin as a dev dependency and it get activated automatically. If you want to configure custom plugin settings, you can still do so in the package.json file.

Installation
npm install --save-dev cds-launchpad-plugin

Custom configuration:
"cds": {
"launchpad": {
theme:'sap_horizon', // SAPUI5 Theme
version: '1.120.1', // SAPUI5 Version
basePath: '', // Path under which you want the sandbox to be served
appConfigPath: '', // External sandbox appconfig json file to be merged with generated appconfig
locale: '', // Language to be used for the sandbox environment
template: '' // 'legacy' (non-async launchpad, default) or 'async' (async launchpad)
}
}

 

UI5 Tooling support


A few weeks back, thanks to the efforts of peter.muessig, the cds-plugin-ui5 was introduced to bridge the gap between CAP & SAPUI5 development.

The library integrates the UI5 Tooling into the default CAP server, which means you're now able to use a single server to perform both CAP & SAPUI5 developments, leveraging the power of both development tools in one.

The cds-launchpad-plugin now automatically detects the cds-plugin-ui5 presence and changes the way the application descriptors are generated for the launchpad. (side-note, the plugin currently only supports the default routes used by cds-plugin-ui5, customized routes are not supported yet)

This means you're now able to use TypeScript for both CAP & SAPUI5 in combination with the cds-launchpad-plugin!


cds-launchpad-plugin combined with cds-plugin-ui5


 

Async launchpad


An additional configuration option "template" was introduced, to allow changing the template used to generate the launchpad. You can either leave the template untouched, set it to "legacy" or "async". For now the default setting is still legacy, in the next major release this will probably be switched to async as this is the best-practice and more future-proof.

Good to know, the way the legacy launchpad template is loaded (using the createRenderer method of class sap.ushell.Container) is deprecated as of SAPUI5 1.120.

Why should you use the async template, next to the fact that you'll have to in the future? Performance! In below screenshots you can see the difference when loading a launchpad with the same configuration using both the legacy & async template.

Results: legacy - 9,5 seconds vs async - 2,2 seconds!!


Legacy launchpad performance



Async launchpad performance


 

Wrap-up


As you can see, quite some changes in only a few weeks, improving the useability & future-proofness of the plugin. Be sure to try them out!

Having troubles or ideas for new features? please use GitHub to report any issues / ideas.

Are you already using the cds-launchpad-plugin? Be sure to leave a comment!

Happy coding!
2 Comments
Labels in this area