skip to Main Content

The SAP Cloud Application Programming (CAP) Model

What is SAP Cloud Application Programming and what value does it bring to the Agile Methodology? 

Application developers across the world are increasingly seeking faster development timeframes. This is with the objective of getting their applications to users much more quickly than was previously possible. Traditionally, this emphasis on rapid time to market would mean compromising on the quality of the application.  Because of the compressed deadlines, there was only so much developers could do to ensure a relatively error-free codebase. 

To solve this problem, SAP introduced the Cloud Application Programming Model. The Cloud Application Programming Model, as it is popularly called, is a framework of languages, libraries, and tools for building enterprise-grade services and applications. However, instead of having developers worry about various technologies, and their relative compatibility in an era of fast-paced technological changes, the CAP allows developers to be domain-centric and work at a higher level of abstraction than they would with traditional technology platforms and frameworks. Therefore, focusing on the business aspect of the application and its anticipated accomplishments for the end user allows developers to build applications that are more likely to be used by end users. Therefore, such an approach would lend itself very well to the agile methodology. 

Architecture details

Let’s delve a bit deeper into the CAP paradigm and examine its building blocks. At the fundamental level, the CAP framework is a mix of proven and broadly adopted open-source and SAP technologies, as shown in the figure below: 

The two highlighted sections in the schematic above are the CDS. This is for the Core Data Services and the Services SDKs and runtimes. While CDS is the universal modeling language that allows developers create both domain models and service definitions, the Services SDKs and runtimes are for Node.js and Java, offering libraries to implement and consume services as well as generic provider implementations serving several requests simultaneously and are primarily used for developing business logic. 

The Development Tools offered with CAP include SAP Business Application Studio or Visual Basic Studio, for developers to freely use any language they wish to for developing applications. 

Every application needs a database, and the SAP CAP provides the option for developers to use SAP HANA or another database. On the frontend part, SAP CAP provides an out-of-the-box support for SAP Fiori but developers can also use other frontend frameworks that they are conversant with. The SAP Cloud Foundry provides the overarching “platform-as-a-service.” Also, it contains middleware, development tools, business intelligence services and database management systems. It supports the complete web application lifecycle including, building, testing, and deploying management and updating applications. SAP CAP rounds off its offering with infrastructure provided by the SAP Cloud Platform. 

Design Principles

SAP CAP operates on three key design principles. All of the design principles reinforce the openness of the platform and the wide variety of options it offers developers.

Cloud Application Programming

The first of these principles is that of zero lock-in. While CAP provides guidance to developers, it does so without being overly prescriptive. This means that developers have the choice of tools and architecture frameworks they want to use. The basic idea is for the SAP CAP to provide generic solutions for recurring or repetitive tasks. 

Secondly, CAP is non-intrusive. This means that only CAP developers would need to know of the framework’s existence. Essentially, this implies that as a developer, your apps can use the framework with third-party libraries that do not know about the framework you are using. 

Finally, SAP CAP is platform-agnostic, which is very important from portability and deployment perspective. This means that there is potential to build applications completely independent of the underlying cloud infrastructure. You can achieve the necessary integration through the use of APIs. 

 

Deployment and Development Prerequisites

SAP CAP uses mainly HANA CDS artifacts for modeling the data service. For the deployment of SAP CAP applications, developers use the Cloud-Foundry environment. 

Cloud Application Programming

As an open-source platform, SAP Cloud Foundry now has bundled related services under one umbrella of “SAP Business Technology Platform”. Therefore, the CAP application deploys on the SAP Cloud Foundry as an MTA application. 

If you are a developer looking to start developing CAP business services, there is a list of prerequisites to consider. You could look at Node.js for writing server-side functions and business logic and use Visual Studio Code. Similarly, you will also need an SQLite tool and the Cloud-Foundry command-line tool. Finally, you will need a Cloud-Foundry trial sub-account in SAP-BTP to set up the deployment environment. 

In the next post, learn the details of creating a business service in Visual Studio and integrating that service with SAP-WebIDE.

If you are interested in viewing similar articles, visit our blog, here.

View our LinkedIn, here.

Harish Kumar Chendolu has been working in the SAP UI5 space for a little over 2 years now. He is passionate about learning new technologies. When he is not working, you will find Harish either on the cricket pitch or practicing the art of meditation.

Back To Top