Developing Applications Running on SAP BTP Using SAP HANA Cloud

Using the SAP Cloud Application Programming Model

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Use the SAP Cloud Application Programming Model

Introducing the SAP Cloud Application Programming Model

SAP Cloud Application Programming Model - Flexibility and Openness

Traditionally Application Development meant a need to understand the Technical dependencies between several components in addition to focus on Domain Knowledge. This added huge complexities during the development life cycles resulting in non-agile,less flexible applications.

In the modern world Agility and Flexibility is the key to success and hence there was a need to simplify the development life cycle by reusing the knowledge gained over the years and reducing the need of involvement in the technical aspects. To overcome the challenges by providing guidance to the developers but also by taking away some of the more technical or foundational tasks to help them focus on the Business Logic "SAP Cloud Application Programming Model" (CAP) was born.

The "SAP Cloud Application Programming Model" (CAP) is an open and opinionated, framework of languages, libraries, and tools for building enterprise-grade services and applications.

CAP is opinionated as it guides developers through proven best practices and a great wealth of out-of-the-box solutions to recurring tasks and remains open to choose technologies, select your Architectural Pattern or use CAP or parts of CAP.

Projects benefit from a primary focus on domain, significantly accelerated development, and safeguarded investments in a world of rapidly changing cloud technologies.

The SAP Cloud Application Programming Model (CAP) is the go-to programming model for business applications on SAP HANA Cloud and SAP Business Technology Platform.

As you can see in this graphic, CAP supports both open-source and SAP tools and technologies

Describing SAP Cloud Application Programming Model

SAP Cloud Application Programming Model(CAP)

SAP Cloud Application Programming Model complements cloud-native technologies with…

  • CDS also known as Core data Services

    Is the data modelling infrastructure also known as Backbone of the Programming Model that provides means to capture service definitions and data models.

  • Service SDKs

    CAP has libraries available for both Java and Node.js , which you can use to provide and consume services through synchronous and asynchronous APIs.

    The SDKs include out-of-the-box integration to lower-level platform services, such as authentication and credential-flows or on and off-boarding of SaaS tenants.

  • (Generic) Service Providers

    Interpret CDS models to automatically serve metadata and CRUD requests out of the box.

  • Data Access Layers

    Use the CDS models to support higher-level data access options. For example, from data models in CDS we generate corresponding sets of JPA classes.

  • SAP Business Application Studio

    is our IDE of choice as well as other tools tailored for the new programming model such as CDS Editors, Code Assists, Outline Views, new Project Explorer, etc. can also be used.

SAP Cloud Application Programming Model (Domain Focus)

The Purpose of SAP Cloud Application Programming Model is to focus on the domain problems as can be seen the image the developers need to focus on the areas highlighted above.

This is achieved by

Close collaboration of domain experts and developers to:

  • Declaratively capture domain knowledge in CDS models
  • Fuels generic runtimes to serve recurring tasks automatically
  • Minimizing boilerplate code to real custom logic

As mentioned earlier SAP CAP guides application developers along a golden path of best practices golden path of the programming model helps you implement data models services and UIs in order to develop stand-alone business applications or extend other cloud solutions

The recommended way to build applications is as follows:

Golden Path

you dousingand let the framework take care of…
Define your Data ModelCDS
  • automatic deployment to SAP HANA Cloud
Define your ServicesCDS
  • translating to OData service definitions
  • serving requests out of the box
  • authorisation*) and standard validations
  • filling in primary keys and audit information
  • writing trace and audit logs
  • health checks
  • etc.
Add Custom LogicJava or Node.js
  • handling database connections
  • including tenant isolation
  • parsing input and
  • serialising responses
Add Fiori UIsCDS Annotations
  • translation to OData vocabularies
  • generating a Fiori elements app skeleton
Reuse existing ServicesCDS Service SDKs
  • Constructing and handling http requests
  • Providing APIs in Java / Node.js
  • Mash-ups with local data

Save progress to your learning plan by logging in or creating an account