SAPUI5 Resources for the Rest of Us
Now while for those who live in countries next to HANA data centres with WiFi access on planes, trains and automobiles; this may not be an issue; or alternatively, if you are happy developing in the UI5 Eclipse environment which takes care of SAPUI5 libraries automatically for you; this post is not for you. Similarly, if you’ve got everything you need in OpenUI5, then move along, there’s nothing to see here.
So whoever’s left, you may find it quite tricky to get the SAPUI5 libraries standalone. I know a few of us have. I tried downloading the latest version from the Service Marketplace, but on both occasions, on separate computers, the files were corrupted (wonder if SAP know about it)…Possibly a temporary thing, but the fact I need to download SAPCAR to get it makes this seem like the Basis way of doing it and not the Developer way.
So I’ve taken the opportunity, while on a plane of course offline; to document what I hope is a temporary hack until SAP make it easier for SAP developers to download the latest SAPUI5 SDK.
Note – Since where I’m currently working, we plan to push the UI5 libraries to an Apache server, I hope someone comes back with the right way of doing this since that latest download for UI5 in Service Marketplace last week was corrupt.
Anyway, the quick hack solution:
Install Eclipse or SAP HANA Studio and then load up the SAP UI Development toolkit for HTML5 (e.g. SAPUI5 plug-ins) ensuring you’ve got the latest version if you already had it installed.
Now locate the relevant jar files for SAPUI5, which will depend on your installation. If you have a minute, just do a search of your drive for “com.sap.ui5*.jar”.
FYI – My files were in C:\Users\<UserName>\.eclipse\org.eclipse.platform_4.3.0_511115836_win32_win32_x86_64\plugins
Once found, order by date modified, and grab all the com.sap.ui5*.jar libraries that relate to the current version, plus the com.sap.ca.*.jar libraries. Put them into a directory, and use something like WinRAR archiver to unzip all of them at once; allowing it to overwrite the one common file between them all.
Now if you open the Meta-inf directory that was created, you’ll find the familiar resources folder which you can move to where you need it or virtual directory straight to it from your web server (ensuring you set the right cache-control to ensure your browser runs quickly).
Also interestingly, there are a bunch of resources in the libraries folder like XSD files and templates for XML views and JS views that are used within Eclipse that would be good to port into Sublime Text 3 if anyone is keen to do this! E.g. You type Button in an XML view in Eclipse, and you get to select the type of Button you want and it inserts a template signature just like snippets.
Alt-Space after Button
Inserting a RadioButton template.
Why not just use OpenUI5?
Now why would you want SAPUI5 versus OpenUI5 – well if you’re developing for SAP software, you may want to take advantage of a few controls (beyond just graphs) that are quite convenient. Don’t believe me – well take a look at a few of them here (pointing at Australian UI5 site because we don’t have a SAPUI5 CDN yet!)
So hopefully this blog will be replaced by someone telling us the right way to do this and get the full SDK but for now – if you were stuck with this also – Enjoy!
Fiori Launchpad Info
Just after I published this I realised I referred to the UI5 libraries being loaded into Apache, but since the post from Craig Haworth I’ve realised that to truly integrate with the Fiori Launchpad with your own Fiori(TM)-Like app; you are restricted to using the Launchpad UI5 libraries, which seem to be linked to 7.40 support pack stack release which is tied to the Gateway release which is tied to your backend IW_BEP version; so if you’re developer says, “can we use 1.23 SAPUI5?” and your Launchpad is on 1.22; you should immediately panic unless you are at the beginning of the project and can afford to upgrade everything. Not to mention every minor patch involves several notes because of the size of the ui5 libraries. Fun!