Q/A for UI5 Tooling SAP Community call (April 1st 2020)
On April 1st we gave a SAP Community call about the “UI5 Tooling – a modern CLI-based development experience”.
The slides can be found here: https://www.slideshare.net/PeterMuessig1/ui5-tooling-ecosystem
Interested in the background and a hand-on? Just follow the instructions in the blog post about the UI5 Tooling: a modern development experience for UI5!
During the session several questions came up and we were unfortunately too short in time to answer them all. This is why we decided to write this blog post and discuss all questions in detail. Here we go:
Will the ability to deploy apps to the SAP server become part of the UI5 tooling?
No. There should be a clear separation between the deploy tooling and the UI5 Tooling. UI5 is running on so many SAP platforms and every platform has its special deployer and only the platform has the dedicated knowledge how the deployment works. The task of the UI5 Tooling is to prepare the application so that it can be deployed into the respective platform.
Has SAP came up with UI5 Tooling to replace the conventional way of development?
The UI5 Tooling has been created to have an agnostic tooling which can be used in any environment of your choice. It runs in SAP Web IDE, SAP Business Application Studio and with any local IDE. The answer is no, not to replace but to extend the conventional way of development.
Can we also host a library project?
The UI5 tooling can also be used to host a library project. You can start the development server in the library and access the resources (content of the src folder) and test resources (content of the test folder).
Is ui5-middleware-simpleproxy for getting server data in to ui5 app without using destinations in SCP?
Yes, the ui5-middleware-simpleproxy is just a simple HTTP proxy which tunnels requests to a provided URL. E.g. you can proxy /northwind/ to https://services.odata.org/V2/Northwind/Northwind.svc/.
Is there a stable solution for the code completion that works for controller and xml view or planned?
Are there any middlewares similar to `grunt-replace` that allow dynamic insert of variables during the build process?
For the build process you require tasks not middlewares. The middlewares are used for the development server and tasks are used in the build process. Right now, there is no generic replace task available, but this might be a great contribution for the UI5 Ecosystem Showcase. Implementing such a replace task shouldn’t be too complicated to do.
Is there a document to convert Maven UI5 project to npm based UI5 project?
The Maven UI5 build was never used externally. Internally we plan to replace the internals of the Maven UI5 build to use the UI5 Tooling. Maven will stick as a build orchestrator, but the internals are using the Node.js based tooling.
In SAP Web IDE we have flpSandbox.html, can we have this kind of interface for the application in UI5 Tooling?
The SAP Web IDE or the Yeoman generator can create the flpSandbox.html for the UI5 applications. By using the UI5 Tooling 2.0 and including the sap.ushell library as a dependency the flpSandbox.html can be used.
I am A bit confused …dependency is to be defined in ui5.yaml and not in package.json, right?
In general, the dependencies to OpenUI5 can still be declared in the package.json. But for SAPUI5 we highly recommend using the UI5 Tooling package manager to manage the dependencies to SAPUI5 as otherwise there could be version inconsistencies. You can read more about this in the UI5ers Buzz #49: The UI5 Tooling and SAPUI5 – The Next Step.
With SAPUI5 on npm does it mean that we can use it for deployment on non-SAP servers?
No, there is no change with the license. If you use SAPUI5 with an app, this app needs to be deployed to an SAP platform.
Any plans to support SAP Fiori elements? Or it is supported out of the box?
SAP Fiori elements (formerly known as Smart Template) are supported by the UI5 Tooling 2.0 out of the box. The UI libararies sap.suite.ui.generic.template and sap.ui.generic.app are available on NPM.
Will self-contained application once deployed on on-premise SAP system and consumed via FLP load faster? Consuming libraries from sap-ui-custom.js or not?
In the FLP scenario, UI5 applications benefit from libraries being already loaded by the FLP or by other applications. Having a self-contained bundle would not be efficient as it will reload modules again and again. But for standalone applications, this is different. Here the self-contained bundle is the optimal way to load the UI5 framework.
I assume there is no change on how the UI5 build process works when having libraries declared within the ui5.yaml file? Only difference being that the libraries aren’t declared in the package.json anymore except the middlewares/cli itself, right?
Correct. The UI5 Tooling is providing access to resources being defined either in the package.json or in the ui5.yaml.
Is SAPUI5 also open source as we have SAPUIi5 lib in npm?
No, there is no change in the licensing of SAPUI5 – SAPUI5 cannot be licensed separately but you need a valid SAP platform license to use SAPUI5. The SAPUI5 nmp libraries are available under the SAP Developer License Agreement: https://tools.hana.ondemand.com/developer-license-3.1.txt.
Is there a way in the current SAPUI5 version to remove un-used js code like from sap.m we are not using the entire library (reason to reduce the library size)?
As being new to the UI5 stack could you please explain what is the advantage of doing development using UI5 Tooling rather than doing development using SAP Web IDE or Eclipse?
Goal of the UI5 Tooling is to enable local development, free choice of devlopment environment, and an easy integration into any CI/CD environment, … But actually also the SAP Web IDE is using the UI5 Tooling to build the UI5 applications. So the high level of reusability is a major aspect of the UI Tooling.
Is there going to be a possibility to connect to OData Services that are only available via a Cloud Connector for development?
The Cloud Connector is only needed to make your on premise systems available to the SAP Cloud Platform environment. In case of developing locally with the UI5 Tooling in your on premise environment you should have direct access to it and can just use the simple proxy for this.
- UI5 Evolution: The Build and Development Tooling
- Introducing the UI5 Tooling for SAPUI5 Projects
- The UI5 Tooling and SAPUI5
- UI5 Tooling: a modern development experience for UI5!
I would love to use IntelliJ to code but I got a problem with a cloud connector:
I work for a client and I'm thus not in their onPremise landscape (and neither their VPN). The WebIDE is connected via a cloud connector. Is there any way to develop locally with UI5 tooling?
Thanks in Advance!
good question. I never tried something like this - but maybe the following article helps? It explains AFAICS how to call an on premise system from Node.js: https://blogs.sap.com/2020/08/07/sap-cloud-platform-how-to-call-onprem-system-from-node.js-app-via-cloud-connector/
If this works, you can maybe use a proxy to call the endpoint using the cloud connector and then connect to the on-premise system? Even more, this might be interesting to create a middleware tooling extension for this? Similar like https://github.com/ui5-community/ui5-ecosystem-showcase/tree/main/packages/ui5-middleware-cfdestination to access CloudFoundry systems?
Thanks for the answer! Our Node.js App (UI5) is using the cloud connector to access the backend, but this is only possible because the WEB IDE has access to the cloud connector. On our local machines we obviously don't. That is the point, I'm trying to solve. Also, this is a security issue, because we don't want the backend nor the cloud connector publicly available...
maybe we misunderstood each other - I thought about installing the cloud connector locally and then using the proxy "locally" to integrate the "local" cloud connector service into the UI5 development server to avoid CORS issues - maybe the blog above wasn't the proper one.
Maybe this is a much better documentation:
With this AFAICS (and I'm definitely not the expert in this topic - just guessing) you should be able to setup a local cloud connector and afterwards just use the simple proxy from the UI5 tooling ecosystem to integrate the local cloud connector into the UI5 development server.
So that I understand the concept right:
SAP Backend Server -> (via Cloud Connector) SAP BTP -> (via Cloud Connector (locally installed)) my local PC -> (via simpleProxy) my UI5 application?
Then I would install the cloud connector locally and connect it to the BTP via a destination? Sound logical to me but also a bit confusing. If this works it would be great. That would also solve the security issue, if I'm not wrong, am I?
Hope this clarifies my setup!
yes, that's how I imagined it. This should be safe and also possible to setup for your local development environment. You can also share your experience with us once you completed the setup. Would be happy to learn as this domain is not really my expertise... 🙂
Thanks for the quick response!
Unfortunately, I'm (only) a trainee and can't just install something anywhere and my instructor is currenlty on holiday... As soon as he is back, I will ask him and test this. I'll post the results here!
Thanks for the help so far, I hope I will bring positive results back!
Hi Leon Fiebig
you looking for something like this:
Unfortunately, there is only available for cloud foundry.
But the idea behind it is to use the Clound Connector and Destinations as a proxy for local development.
Also you need the permission to deploy to a cloud foundry space.
Thanks for the answer!
Unfortunately I'm using neo and not Cloud Foundry, that makes this answer negligible, doesn't it?