Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use SAP cloud platform Mobile Service to develop mobile applications

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use SAP cloud platform Mobile Service to develop mobile applications. I think it is very practical, so I share it with you. I hope you can get something after reading this article.

What we are going to introduce today is another mobile application development method launched by SAP, which is implemented by SAP Cloud Platform Mobile Service. Anyone who is interested in this solution can experience its use through a free SAP Cloud Platform test account.

The underlying layer of SAP cloud platform Mobile Service is based on NativeScript, and another open source framework for building native mobile applications using JavaScript:

Https://www.

The Cordova technology first mentioned by Jerry earlier, the mobile application constructed is also known as Hybrid (hybrid) application. The essence of this application is a web application running in the Webview control of the mobile platform. As the name implies, React-Native builds a real native mobile application, using basic UI components no different from native applications written in Object C or Java, except that these components are now operated by Web developers through the JavaScript language and React, and finally converted into native applications by the compiler.

The working principle of NativeScript framework is different from that of React-Native. React-Native implements the two-way interaction between JavaScript and the native API of the mobile platform through the concept of Bridge, while the JavaScript code written by NativeScript runs in the NativeScript runtime (Runtime), which interacts with the native API of the mobile platform through the runtime environment. The NativeScript runtime is actually a JavaScript virtual machine, based on the Google V8 engine on the Android platform and WebKit JavaScriptCore on iOS.

Fortunately, SAP Cloud Platform has encapsulated these details for us by introducing the concept of Mobile Development Kit (hereinafter referred to as MDK). For mobile application developers working on the SAP cloud platform, MDK is a client on the Android or iOS platform, and later Jerry will show you how to install it.

With the help of SAP MDK, now we don't need Android Studio or XCode, we can develop mobile applications directly with SAP WebIDE. Below, Jerry uses SAP cloud platform Mobile Service to create a new mobile application to give you an overview of the development process.

Log in to SAP Cloud Platform and click Support to enter the console of Mobile Service:

Create a new application:

Maintain the ID and name of the application:

After creation, you can assign Feature (feature) to the application named Jerry MDK Demo:

These features can be understood as some best practices abstracted by SAP on the functions that mobile applications need to implement. After assigning these features in the list, the mobile application project generated by WebIDE will automatically include the corresponding template implementation:

For example, recall our process of developing SAP UI5 applications: usually, instead of connecting directly to the backend OData service, we will first consume local Sample data through the Mock Server provided by UI5, and then connect to the backend OData service for testing after the front-end page development is finished.

SAP Cloud Platform Mobile Service also provides a feature similar to SAP UI5 Mock server, namely Mobile Sample OData ESPM. ESPM is the abbreviation of Enterprise Sales Procurement Model, which contains a collection of a series of business data such as SalesOrder,Customers,Products.

After assigning the required features to the application in the Mobile Service console, we went to SAP WebIDE and enabled the extension Mobile Service Development Tools:

After the extension is enabled, there will be an extra MDK Development tag on the left side of the SAP WebIDE:

Create a new MDK project here:

In the drop-down menu in the red highlighted field, select the application ID:com.sap.jerry.demo that you just created and assigned the feature in the Mobile Service console:

If you want to connect to a third-party OData service, maintain its address in the Destination of the SAP cloud platform.

Successfully parsed the metadata of the OData service:

The project automatically generated by the SAP WebIDE Mobile Service Development Tools extension is shown in the following figure, where Application.app, the file, and Jerry compares it to the manifest.xml configuration file of the Android project:

How to deploy the project in WebIDE to the mobile device as a mobile application? Select MDK Deploy and Activate from the right-click menu:

You can see the message of successful deployment in the WebIDE console:

After the deployment is successful, a QR code will be generated. If SAP Mobile Services Client is already installed on the mobile device, scanning the QR code will automatically open the application just deployed in WebIDE on the device.

From the introduction to SAP Mobile Services Client in Google Play, we can see how it works: the MDK project created in SAP WebIDE actually generates metadata in json format; after connecting to SAP cloud platform Mobile Service using SAP Mobile Services Client installed on mobile devices, the former will receive these application metadata from the latter, draw the application UI and complete the initialization action.

For Samsung mobile phones used by Jerry, after installing SAP Mobile Services Client, scan the QR code, pop up a prompt window, and enter the user name and password of SAP cloud platform to log in:

Then click Get Started:

SAP Mobile Services Client will connect to SAP cloud platform Mobile Service and download the application metadata created in WebIDE:

And complete the initialization operation.

Because Jerry does not draw any controls on the page in WebIDE, it only defines Caption, so when the application opens, there is nothing on the interface, just the page title I defined:

If you click Try the demo, you can see that the previously mentioned ESPM sample data is displayed on the device as follows:

The above is how to use SAP cloud platform Mobile Service to develop mobile applications. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report