This public repository is read-only and no longer maintained. For the latest sample code repositories, visit the SAP Samples organization.
This repository contains the material for the CodeJam on SAP Cloud Application Programming Model with Node.js. Prerequisites and recommendations for this CodeJam are documented in the prerequisites file.
The focus of this CodeJam is the SAP Cloud Application Programming Model ("CAP" for short) with Node.js. Through a series of developer focused hands-on exercises you'll get to know the CAP related tools, create a CAP project and learn about various aspects such as compilation, persistence, OData operations, data models & service definitions and how they relate, and dig into annotations, custom logic and debugging. You'll also add a user interface (UI) layer, and see how the entire set of artifacts can be deployed to the SAP Cloud Platform.
The material consists of a series of exercises that are to be done in order (each one building on the previous one). Each exercise is contained in a directory, with a main 'readme' file containing the core exercise instructions, with optional supporting files, such as screenshots and sample files.
Except for some of the content in exercise 09, we strongly recommend you avoid copy/pasting content - there isn't much to type in all, and learning works better when it starts with osmosis through the fingertips! Everything you need to enter will be described in each of the exercise 'readme' files.
At the end of each exercise there are questions. These questions are designed to help you think about the content just covered, and are to be discussed with the entire CodeJam class, at the end of each exercise. If you finish an exercise early, please resist the temptation to continue with the next one. Instead, explore what you've just done and see if you can find out more about the subject that was covered. That way we all stay on track together and can benefit from some reflection via the questions (and answers).
👉 Where there's an action for you to perform, it will be prefixed with this pointing symbol, to help you focus on where you are in each exercise.
Here's an overview of the exercises in this CodeJam.
- Exercise 01 - Installing the CAP related tools
- Exercise 02 - Creating a new CAP project
- Exercise 03 - Enhancing the project & adding persistence
- Exercise 04 - Adding data & testing OData operations
- Exercise 05 - Adding a further entity, using common definition features
- Exercise 06 - Enhancing the service with annotations
- Exercise 07 - Defining a second service
- Exercise 08 - Adding custom logic, and debugging
- Exercise 09 - Introducing an app at the UI layer
- Exercise 10 - Deploy the app to Cloud Foundry
At the end of this CodeJam, we would be really grateful if you could spend a minute providing us with your thoughts in this feedback form. Thank you.
The requirements to follow the exercises in this repository, including hardware and software, are detailed in the prerequisites file.
In case you encounter problems, you may find answers in the Frequently Reported Issues document (FRI).
You do not need to download this repository nor install anything from it. You can just follow the exercises by visiting each of them as listed in the exercises section.
Support for the content in this repository is available during CodeJam events, for which this content has been designed. Otherwise, this content is provided "as-is" with no other support.
If you wish to contribute code, offer fixes or improvements, please send a pull request (PR). Due to legal reasons, contributors will be asked to accept a Developer Certificate of Origin (DCO) on submitting their first PR to this project. This DCO acceptance can be done in the PR itself - look out for the CLA assistant that will guide you through the simple process. SAP uses the standard DCO text of the Linux Foundation.
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License version 2.0.