Hello,
Sorry for the noob questions, I do not have much experience using OpenUI5.
First of all I am interested in installing and using OpenUI5 using npm. From what I've understood, if you want to build an application using this framework for production, you need to manually download the runtime and copy it into your project. This will not be the best approach, for a couple of reasons: if you want to update to a new version, using npm will be much easier. Second reason for not having the full library included is that I can ignore the node_modules folder in my repository and keep a lower size for it. And it will be much more straightforward for beginners such as myself, just run "npm install openui5" and start coding the app.
Second, if I choose to manually download and include the runtime in my project, how should I configure webpack to build an OpenUI5 app? Would it be possible to compress, minify and pack all the JavaScript files?
Thanks for all the help.
Hey @viqtor1!
There are no "noob" questions and your question is actually really valid 馃槈
We are currently providing the OpenUI5 libraries as bower packages.
See our blog article for more information: http://openui5.tumblr.com/post/104843094047/openui5-now-also-available-via-bower
This allows you to use bower as a package manager to download the OpenUI5 libraries in a specific version, similar to how you would expect it to work with npm.
For build tooling there are currently grunt tasks provided in order to bundle your libraries / components and compile themes:
https://github.com/SAP/grunt-openui5
You can see a sample app using both aspects here:
https://github.com/SAP/openui5-sample-app
We are currently evaluating different new approaches for our tooling support which also includes npm, webpack, gulp and many others.
So we definitely have it on our roadmap but unfortunately there's nothing to share, yet.
Hi @matz3 ,
it could be of use an _open_ discussion on ways to delivering the app as a single gzip file, containing all the resources _and_ the app.
If XML-Views can be transformed into js files the better: we could have one single JS file for everything but icons and images and perform compression and optimizations on it through ClosureJS or WebPack.
I'm already doing it with my apps and the speed, once downloaded OpenUI5 is blazingly fast even in case of updates (a single JS app on V8 or Edge today can be as fast as a native application, if you don't hang yourself on lazy loading of markup-based components).
The real showstopper in UI5 speed is loading XML bloat and json configuratons so the automatic translator @akudev mentioned feasible in #873 would be a real boon to pack all the code together.
(I will always avoid XML-Views like the plagues so I cannot be of help in that).
That would help for Cordova-based mobile apps as well, for those who care.
--R
Most helpful comment
Hey @viqtor1!
There are no "noob" questions and your question is actually really valid 馃槈
We are currently providing the OpenUI5 libraries as bower packages.
See our blog article for more information: http://openui5.tumblr.com/post/104843094047/openui5-now-also-available-via-bower
This allows you to use bower as a package manager to download the OpenUI5 libraries in a specific version, similar to how you would expect it to work with npm.
For build tooling there are currently grunt tasks provided in order to bundle your libraries / components and compile themes:
https://github.com/SAP/grunt-openui5
You can see a sample app using both aspects here:
https://github.com/SAP/openui5-sample-app
We are currently evaluating different new approaches for our tooling support which also includes npm, webpack, gulp and many others.
So we definitely have it on our roadmap but unfortunately there's nothing to share, yet.