Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Developer Challenge - SAP Cloud Application Programming Model (Week 1)

nicoschoenteich
Developer Advocate
Developer Advocate
54,890
Please note that this challenge is closed. The deadline for receiving a badge upon successful completion has passed. Check out this new challenge for the month of August.
 
Welcome to the first week of this month's SAP Developer Challenge. This week we are going to learn how to get started with the SAP Cloud Application Programming Model (CAP) and domain modeling. If you haven't read the announcement blog post for this challenge, please head over and do so.
 

The Challenge

 
The objective this week is to build a CAP service, that can track golf rounds. Yes, you read that right – golf rounds ️🏌🏽‍. This is a completely artificial scenario that we made up, but it lends itself pretty well to practice a few basic CAP features.
We have prepared a starter project (link to CodeSandbox below) that already contains the entity "Rounds" and exposes it via a service. It is your job to enrich this existing service.

This is what you have to do to successfully complete this week's challenge:
  1.  Go to the CodeSandbox and fork it. You have to have an account with CodeSandbox and be be signed in to be able to do that.
  2. Work on the project so it represents the following relationships:
        1. The service should track who entered a new round and when it was entered (hint: managed entities).
        2. A round consists of multiple holes. No hole can exists without its "parent" round (hint: compositions vs. associations).
        3. Each hole has a score, representing the number of shots it took a player to get the ball into the hole.
        4. Similarly, each hole has a par of 3, 4, or 5, representing the average amount of shots it takes a professional golfer to get the ball into the hole.
        5. Each hole consists of one or more shots. Similar to rounds and holes, no shot can exists without its "parent" hole (hint: compositions vs. associations).
        6. (Feel free to add more fields to the entities as you see fit.)
  3. Run the dev server using the predefined "dev" task. To do so, click on the little plus icon (+) to open the dev tools and click on "Tasks > dev".
  4. Wait for the server to start. Once done, click on "http://localhost:4004".
  5. Open the metadata of the "browse" service.
  6. Take a screen shot of the metadata and post it into this discussion thread. Hopefully it looks something like this (a few sections collapsed in the screen shot):

metadata.png

 

Resources

 
We have gathered a few helpful resources to get started. Also make sure to inspect the existing code in the starter project and try to understand what it does.


Note: If you encounter issues with your dev server not starting properly, check your cds syntax. Unfortunately, the CodeSandbox doesn't have syntax highlighting for cds and it may not provide clear error messages. One useful approach is to comment out sections of code until the server starts, then gradually uncomment to isolate the problematic line.

Good luck and happy learning!
168 REPLIES 168
Read only

SebSchlegel
Explorer
10,819

My solution for the week 1 challenge 😊

SebSchlegel_0-1688989569270.png

 

Read only

Read only

10,873

Below is my submission

HarshalN_0-1688993409010.png

 

Read only

Read only

ZhongpinWang
Product and Topic Expert
Product and Topic Expert
10,868

My submission: 

Screenshot_2023-07-12_15-37-26.png

Read only

Read only

karthikarjun
Active Contributor
10,835

Hello, Below is my comment 

karthikarjun_0-1689053930566.png

SAP Cloud Application Programming Model

 

Regards,

Karthik Arjun

 

 

Karthik Arjun
Read only

10,676

Looks good as far as I can tell, well done

Read only

ajay_soreng
Developer Advocate
Developer Advocate
10,838

my submission for week 1 Screenshot 2023-07-11 at 12.29.34 PM.png

Read only

10,684

Well done Ajay

Read only

Mikkelj
Explorer
10,826

I took the liberty to go all in on creative freedom... i'm on summer holiday and needed some daddy time 🙂

Mikkelj_0-1689082143303.png

 

Read only

10,820

It does not seem like i'm able to share the full metadata, so just made a repo for it 🙂

https://github.com/MikkelJ/july2023/blob/main/db/schema.cds

Read only

10,689

Oh wow you really did go above and beyond! Enjoy your vacation! Well done

Read only

10,688

Also, it looks like you know thing or two about golf 😉

Read only

AlessandroB
Explorer
10,816

Hello!

Here is my submission for week 1:

AlessandroB_0-1689103127231.png

 

Read only

Read only

Read only

Phil-L
Explorer
10,819

 

My submission for the week 1 challenge. 

Week 1 Challenge.jpg

 

 

 

Read only

Read only

Aliaksandr_Ch41
Product and Topic Expert
Product and Topic Expert
10,811

Hi @nicoschoenteich ,
Week 1 screenshot🤘:

CAP week 1.png

Read only

Read only

cd_winc
Explorer
10,814

Hi!

It's amazing to try something new!

My submission:

Capture.PNG

Read only

Read only

Valentin_Huber
Product and Topic Expert
Product and Topic Expert
10,789

Hi! Thanks for setting this up! 🙂

My submission:

Valentin_Huber_0-1689169304675.png

 

Read only

10,751

Your welcome, looks good as far as I can tell!

Read only

dpk_bhat76
Product and Topic Expert
Product and Topic Expert
10,785

Great work!
Screenshot for Week 1!

 

dpk_bhat_1-1689169555696.png

 

Read only

Read only

alina-balysh
Discoverer
10,789

Hello!
My submission:

327e02fb-5d4a-4e2f-9869-3c396beb781b.png

Read only

0 Likes
10,775

Well done

Read only

D_Pietroniro
Product and Topic Expert
Product and Topic Expert
10,785

Hello,

My submission.

 

2023-07-12_11-36-35.png

Read only

Read only

ajos
Explorer
10,702

my week 1 submission.

ajos_2-1689216721489.png

 

Read only

Read only

Read only

wawowrt
Explorer
10,639

Hello @nicoschoenteich 🙂 This is my submission for Week 1.

CAP_Week1.png

Read only

Read only

catalinfeidi
Participant
10,646

Done for week 1 🙂

golf week 1.png

Read only