SAP Programming Models
An application programming model is a set of guidelines describing how an application will be built. SAP offers two major programming models to build enterprise and cloud-ready applications and services: SAP Cloud Application Programming Model (CAP) and ABAP RESTful Application Programming Model (RAP).
Both CAP and RAP use Core Data Services (CDS) as the ubiquitous data modeling language. CDS can be connected to any data source to fetch or change data – SAP HANA platform, an API of an SAP solution or a third-party REST service.
So how do the two models differ? CAP allows you to create apps in open source languages such as Java and JavaScript, and to run on open-source runtimes such as Node.js. RAP leverages the well-known and widely used ABAP language and runs on the ABAP platform in the cloud and on-prem.
CAP is a framework of tools, languages and libraries. With CAP, you can build enterprise services and applications more rapidly in a full-stack development approach. RAP helps you efficiently build enterprise-ready, SAP Fiori apps and services on SAP Business Technology Platform ABAP Environment as well as SAP S/4HANA.

Relevant Products
SAP Cloud Application Programming Model
SAP Cloud Application Programming Model is a framework of languages, libraries, and tools for building enterprise-grade services and applications. This framework combines broadly adopted open-source and SAP tools and technologies, along with guidance and best practices that help you focus on business-specific logic.
ABAP RESTful Application Programming Model
RAP helps you build enterprise SAP Fiori apps and services on SAP S/4HANA and SAP BTP ABAP Environment. It orchestrates SAP technologies like Core Data Services (CDS) and OData with new concepts, guidelines and tools to offer a new programming model for ABAP development -- regardless of whether you want to start from scratch or reuse existing business logic.
Access in-depth resources on the SAP Community
Under the Hood: CAP and RAP

CAP and RAP let you build and integrate applications for the intelligent enterprise, with both using CDS as the modeling language.
Developer Resources
SAP Fiori Overview: Design, Develop and Deploy
(openSAP course)