At SAP TechEd Las Vegas this year Björn Goerke announced, among a lot of other great new things, the new SAP Cloud Platform SDK for service development. Generally speaking, it provides generic development libraries and tools such as OData services provisioning and consumption, business events and so on to enable application developers to easily create extensions on SAP Cloud Platform. In this blog I would like to provide you more insight about what the SDK does, how you can use it to build apps for SAP Cloud Platform and what resources help you to make best use of it.
Let’s first have a closer look at the scope of the SDK. As a “software development kit”, it helps you develop software, in this case apps which will run on SAP Cloud Platform. More specifically the SDK at this point is a Java SDK and the resulting apps will run on SAP Cloud Platform, Cloud Foundry Environment.
Cloud apps are about providing and consuming services. This is where the SDK will help you by simplifying the development significantly. Apps built with the SDK can easily provision RESTful services based on open standard OData (V4) protocol, which is broadly adopted not only in the SAP world. The implementation for the different OData service operations (CRUDQ, actions, functions) can be done with very few lines of code, if it is not already done generically by the service provisioning framework of the SDK. Under the hood unsurprisingly we are using the Apache Olingo library for OData, which was largely contributed by SAP. The following code demonstrates some key attributes of the APIs of the SDK:
For the consumption of services again there are already powerful APIs for the most important datasources: OData (for instance for working with data in SAP S/4HANA) and CDS, which is the metamodel of choice now for business objects in SAP. The following self-explaning line of code shows an sample OData service request for retrieving product data from an S/4HANA system:
As you can easily imagine, as a Java developer you already now have some key ingredients for building what we call Extension Apps: these are apps, which provision services in the cloud (nothing special so far) but at the same time let you re-use all the data and processes, which you have already in place in your organization. Why bother building yet another store for products or business partners if you can simply use the existing one?
Beyond support for service-related development the SDK also offers you a growing number of capabilities which you will need for writing reliable, secure and manageable cloud apps.
So, when and how can you start using the SAP Cloud Platform SDK for service development?
You can start now, the SDK is publicly available on Maven Central under the GroupID com.sap.cloud.servicesdk and you can use it with your IDE of choice. It contains two archetypes: Quickstart (for your own project) and Sample (fully implemented app). We will continue to add functionality and datasources to the SDK and therefore you may want to come back from time to time to get the latest version.
In addition to the Javadocs that come with the SDK there is a detailed documentation on SAP Help Portal, which also contains currently four tutorials:
- Creating a Simple OData V4 Service That Exposes Mock Data
- Creating an OData V4 Service from an OData V2 Service
- Creating an OData V4 Service That Exposes a CDS Data Source
- Creating an OData V4 Service That Exposes Data From Multiple Data Sources
Also Arun Bhaskaran Nair from the development team has published a blog showing step by step how you in less than an hour can build an app with an OData service on SAP Cloud Platform by using the SDK.
Questions or feedback? Just Ask a Question, use the primary tag “development tools for SAP Cloud Platform” and the user tag “SAP Cloud Platform SDK for service development”