What is SAP CAP and what value does it bring to the Agile Methodology?
Application developers across the world are increasingly seeking faster time to develop with the objective of getting their applications much quicker to users than was previously possible. Traditionally, this emphasis on rapid time to market would mean compromising on the quality of the application because with 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 CAP Model, as it is popularly called, is a framework of languages, libraries, and tools for building enterprise-grade services and applications. 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. Focusing on the business aspect of the application and what it’s expected to accomplish for the end user, allows developers to build applications that are more likely to be used by end users and such an approach would lend itself very well to the agile methodology.
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, or 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”, which 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.
SAP CAP operates on three key design principles, all of which reinforce the openness of the platform and the wide variety of options it offers developers.
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 tasks that are recurring or repetitive in nature.
The second is that CAP is non-intrusive. This means that only CAP developers would need to know of the framework’s existence, essentially implying 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. Being platform-agnostic means that applications can be built that are completely independent of the underlying cloud infrastructure by completely using APIs to achieve any required integration.
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.
As an open-source platform, SAP Cloud Foundry now has bundled related services under one umbrella of “SAP Business Technology Platform”. The CAP application is deployed on the SAP Cloud Foundry as an MTA application.
If you are a developer looking to start developing CAP business services, here is a list of prerequisites for you to consider. You could look at Node.js for writing server-side functions and business logic and use Visual Studio Code. 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, we will take you through the details of creating a business service in Visual Studio and integrating that service with SAP-WebIDE.