I want to share some great sites and other sources which helped me the most and where you can start with OpenUI5 / SAPUI5. Even though when I started this blog, it was meant to be more about ABAP, but OpenUI5 is future for SAP developers, so why not to play around with new cool technologies.
OpenUI5 / SAPUI5 Tutorial
In this tutorial, you will learn how to create OpenUI5 / SAPUI5 application from scratch, having your backend part served by SAP Gateway. Check out the articles about tutorial how to create example application with description of its critical parts and links to github repository where the whole application’s source code can be seen. You will find here also article about several more resources where you can leverage your skills.
Simple openUI5 application II. – How to create a frontend in OpenUI5 that will consume an OData service
After the first part of this tutorial, we have created and run an OData service that can write/read data to/from a SAP database table. In this part, I will explain how the frontend of an OpenUI5 application works. Whole source code can be found in my github repository. You will actually see the running demo application at the end of this article.
Making GET parameters not readable for users in Javascript
When you want to hide some URL parameters from users, there is a simple way how to do it. Be aware that more experienced users can read it anyway, so this is not a way how to send confidential data, just to make URL address not readable at first sight.
For this problem, we can use base64 encoding. There are functions in various programming languages for encoding and decoding base64.
In Javascript we can use following approach to encode and decode some string:
1 2 3 |
var enc = btoa("Hello world"); alert(enc); alert(atob(enc)); |
Instead of Hello world we will get string SGVsbG93IHdvcmxk.
To sum up, we send our parameters in one GET parameter in appropriate format such as JSON and encoded as base64. In Javascript, we decode base64, explode parameters into variables and we are done.