1. What is it?
    1. CAP - Cloud Application Programming
    2. A framework/combination of languages, libraries and tools - both open source and SAP technologies - built and maintained by SAP.
      1. Two different runtime versions NodeJs & JAVA
      2. Leverages Core Data Services (CDS) - a universal modelling language to describe business domains in conceptual, concise way.
  2. Why use CAP?
    1. Quickly and efficiently build enterprise services and apps in a full-stack development approach
    2. Build solutions quickly, increase developer productivity.
    3. Easily consume external services - e.g. S/4HANA or other web services
    4. Security built-in: role-based access control, data encryption, and secure communication protocols.
    5. Plugins are being developed by SAP and Partners (making it extensible)
      1. Messaging with Apache Kafka
      2. Attachments (blob store)
      3. Change tracking
      4. Send notifications to SAP Build Work Zone
      5. ABAP RFC functions
  3. How - "The Golden Path"
    1. Pre-requisites
      1. VS Code (node installed etc)
      2. SAP Business Application Studio (free trial available)
    2. Define your data model
      1. Use common types for consistency from @sap/cds/common - for interoperability and conciseness.
      2. Common re-use aspects
        1. "managed" - adds four elements to capture created by/at and latest modified by/at management information for records
        2. "cuid" - add universally unique primary keys to your entity definitions.
        3. "temporal" - validfrom and validto fields to the entity
      3. Common re-use types
        1. Country
        2. CodeList - (ID, name. descr)
        3. Currency
        4. Language
      4. Provide initial data, place CSV files in a folder called csv next to your data models
        1. Add translated texts by *_texts.csv
        2. Prebuilt content for countries, currencies, languages is available.
          1. npm add @sap/cds-common-content --save
          2. using from '@sap/cds-common-content';
    3. Define your services
      1. Expose your data via service models
        1. Actions
          1. Add or modify data - called via a POST (have side effects)
        2. Functions
          1. Retrieve data from server - via a GET
    4. Add custom logic
      1. Build custom operations to support your use case
      2. You can use CQL as a language to interact with DB / Models
    5. Add Fiori UIs
      1. SAP Fiori elements apps are generic front ends, which construct and render the pages and controls based on annotated metadata documents.
        1. Write less code and be more consistent!
        2. Fiori Elements Floorplans
      2. Use the Fiori Application Generator and select a floorplan which suits your usecase.
        1. Set up navigation in Fiori launchpad
      3. Define annotations to help define see UI Vocabulary
    6. Re-use existing services
  4. How much does it cost?
    1. Complex question, as portions of the framework are open source, but to deploy in run in a production scenario typically would mean running inside BTP and HANA.
      1. SAP BTP is ideal target destination (Cloud Foundry) but can also be deployed to Kyma (kubernetes)
      2. HANA is preferred persistence layer ($$) however postgres can be used (cheaper)
    2. Cost Components
      1. Runtime
        1. BTP Cloud Foundry
        2. BTP Kyma
      2. Persistence Layer
        1. BTP on HANA
        2. BTP on Postgres Hyperscalar
        3. BTP on SQL Lite
      3. SAP Business Application Studio license (free trial is available)
  5. Who uses CAP?
    1. SAP themselves (obviously) -> SAP Privacy Governance, SAP Financial Compliance Management, SAP Cloud for utilities and many more.
    2. SAP Customers that have chosen BTP as their extension platform
    3. What skills do I need?
      1. Developer with JavaScript of Java background
      2. SQL and DB knowledge
      3. Web Application Development (Fiori) and UX skills
  6. Links and Resources
    1. Main Help Files
      1. Main Documentation (CAPire)
      2. UI5 Fiori Elements
    2. Communities
      1. A lot of SAP community has moved to the Blueskye app (twitter clone)
    3. Conferences
      1. Re>CAP (
        1. Videos from 2024 Conference
      2. SAP TechEd
        1. Developer Productivity with CAP
    4. Blogs
      1. DJ Adams Blog Series
      2. CDS Fundamentals and working with OData
      3. Deploying an App on Cloud Foundry
      4. Deploying CAP application to Kyma runtime
      5. CAP Programming model - local development hurdles
      6. Understanding CQL Queries
      7. What is the CAP programming model?
      8. Breathe Life into Your Services by Using Actions and Functions in CAP
      9. Domain modelling in CAP
      10. SAP CAP Types & tools
      11. Send a SMS via Twilio from CAP
      12. Making REST calls with CAP
      13. Cheat Sheet for URI Patterns in OData actions and functions
    5. Videos
      1. SAP CAP Models Beginner to Advanced
      2. My personal CAP Playlist
      3. Youtube Hands On Dev video recordings
      4. CAPM Conference in July 2023 (need S-User)
    6. Presentations
      1. ABAP is Dead - long live SAP CAPM (2019)
    7. Books
      1. Developing Applications with the SAP Cloud Application Programming Model ($)
      2. SAP UI Framework for enterprise developers ($)
    8. Code References
      1. SAP Samples in GitHub
      2. SAP Fiori Elements showcase
    9. Learning
      1. Build a App using CAP for Node.js
      2. CAP for ABAP Programmers
      3. Take a deep dive into OData
      4. Developing a Fiori Elements App based on CAP OData v4
      5. UX405 - Fiori Elements Simulations
      6. Set up trial account with cloud identity service
    10. Tooling
      1. SAP Fiori Tools
        1. The SAP Fiori tools extensions help you create applications, visualize navigation, automatically generate code, and more. Used in combination with SAP Fiori elements, these extensions can increase your development productivity, ensure the consistency of experience between applications, and help you build a scalable experience
      2. SAP Business Application Studio
      3. CDS has a REPL env, from terminal -> "cds repl" to test the CDS facade object
      4. CAP Project Tools incl. typescript
  7. Sample Apps (github)
    1. CAP sflight
    2. CAP Eventing
    3. CAP Risk Management
    4. CAP RFC Example
    5. CAP Northbreeze
    6. Best of cap-js
  8. Mind Map by Warren Eiserman