Overview of the Cloud Application Programming Model — CDS, Node.js vs Java runtimes, and where CAP fits in the BTP ecosystem.
By the end of this lesson you'll understand what CAP is, why SAP built it, how it fits into the BTP ecosystem, and when to choose the Node.js runtime vs the Java runtime.
CAP stands for Cloud Application Programming Model. It is a framework of languages, libraries, and tools that SAP provides to build enterprise-grade cloud services and applications on SAP Business Technology Platform (BTP).
Think of CAP as a full-stack backend framework — like Express.js or Spring Boot, but purpose-built for SAP's cloud world. It handles the boring, repetitive parts of building cloud services so you can focus on business logic.
CDS is CAP's schema and query language. You describe your data model and services in .cds files using a clean, human-readable syntax. CAP automatically generates OData V4 APIs, database tables, and TypeScript types from those definitions.
// A complete data model + service in ~10 lines of CDS
entity Books {
key ID : UUID;
title: String(100);
price: Decimal(10,2);
}
service BookshopService {
entity Books as projection on Books;
}
CAP runs on two runtimes:
- Node.js (@sap/cds) — faster to develop, great for APIs and lightweight services
- Java (com.sap.cds:cds4j) — better for heavy enterprise workloads, integrates with Spring Boot
This course uses Node.js. Everything you learn is transferable to Java with minor syntax differences.
CAP is first-class on BTP. It automatically wires up to XSUAA (auth), SAP HANA Cloud (persistence), Destination Service (connectivity), and Event Mesh (messaging) with minimal configuration.
Browser / Fiori App
│
▼
AppRouter ← handles auth, routes
│
▼
CAP Service ← your business logic (this course)
│
┌────┴────┐
▼ ▼
HANA Cloud External APIs (S/4HANA, etc.)
Your CAP service is the backend layer — it exposes OData V4 or REST APIs, talks to the database, calls external services, and enforces authorization rules.
Before CAP, SAP developers had to:
- Write ABAP for backend logic
- Hand-code OData services (tedious and error-prone)
- Manually wire up authentication, database, and deployment
CAP removes all of that boilerplate. You define your model in CDS and CAP generates OData endpoints, database tables, and documentation automatically.
| Node.js | Java | |
|---|---|---|
| Best for | APIs, microservices, rapid development | Heavy processing, large enterprise orgs |
| Learning curve | Low | Medium–High |
| SAP support | Full | Full |
| Spring Boot | No | Yes |
| This course | ✅ Yes | ❌ No |
For new projects on BTP, Node.js is the recommended starting point unless your organization has a strong Java preference.
| Term | Meaning |
|---|---|
| CDS | Core Data Services — CAP's schema language |
| Entity | A database table defined in CDS |
| Service | A CDS-defined API that exposes entities |
| Handler | Node.js function that runs on CRUD events |
| HDI | HANA Deployment Infrastructure — how HANA schemas are deployed |
| XSUAA | SAP's OAuth 2.0 authorization server on BTP |
| MTA | Multi-Target Application — the BTP deployment package |
You should now be able to answer:
- What problem does CAP solve?
- What are the three pillars of CAP?
- What is CDS?
- When would you choose Java over Node.js?
In the next lesson, you'll set up your development environment and install all the tools you need.
Sign in for progress tracking & Q&A →