Two runtimes, one programming model
CAP ships with two runtimes: Node.js and Java. Same CDS modeling language, same OData output — different languages, tooling, and ecosystems underneath. Picking wrong costs you weeks of friction, so let's make the choice deliberately.
The programming model is identical in both. Your CDS models, annotations, and service definitions transfer 1:1 — only the handler language changes.
The two runtimes at a glance
- CAP Node.js — the original runtime. Fastest iteration, biggest community, most tutorials and samples. JavaScript/TypeScript handlers.
- CAP Java — the enterprise runtime. Spring Boot foundation, strong typing, familiar to ABAP/Java teams moving to BTP.
- Feature parity — both support OData V4, draft, authorization, messaging, multitenancy. Gaps close quickly these days.
- Tooling — both work with VS Code,
cdsCLI, and the same deployment descriptors.
Choose Node.js if…
You want the shortest path from zero to running service. The feedback loop is instant — cds watch restarts on save, and the sample ecosystem (cap/samples, bookshop) is richest here.
It's also the natural pick for full-stack teams: one language across UI5 frontend and backend service. Hiring-wise, JavaScript developers are easier to find for most product teams.
Choose Java if…
Your team already lives in Java or Spring. Large enterprise shops with Java standards, existing libraries, and strict typing requirements will feel at home immediately.
Java also shines where compile-time safety matters: big domains, long-lived codebases, teams where the compiler catching mistakes beats runtime debugging. The Spring ecosystem (security, data, messaging integrations) comes along for free.
Performance differences are a rounding error for typical business services. Choose by team skill, not benchmarks.
What doesn't change either way
Your investment in CDS is safe: entities, associations, compositions, and annotations are runtime-agnostic. Service definitions, Fiori Elements UIs, and authorization concepts work identically.
Even switching later is feasible — port the handlers, keep the models. Teams do it, though nobody calls it fun.
Can you mix both?
Technically yes — some teams run Node.js for rapid-prototyping services and Java for the system of record. In practice, mixed runtimes double your operational surface: two build pipelines, two skill sets, two failure modes.
Pick one runtime per landscape and stick with it. Consistency beats theoretical best-of-breed when you're on call at 2 AM.
The pragmatic answer
Learning? Start with Node.js — more examples, faster feedback, lower setup cost. Joining a Java-heavy enterprise team? Learn Java — you'll map your CDS knowledge straight across.
Either way, learn CDS deeply. That's the durable skill; the runtime is syntax.
Which runtime did you pick, and why? Tell me in the comments.