The syntax `Books.id` (dot) is deprecated and is warned about in the latest CDS releases. It should be replaced by either `Books:id` (colon, supported since cds-compiler v1.41.0) or `type of Books:id` (tested with cds-compiler v1.20.0 from November 2019).
Bookshop Getting Started Sample
This stand-alone sample introduces the essential tasks in the development of CAP-based services as also covered in the Getting Started guide in capire.
Hypothetical Use Cases
- Build a service that allows to browse Books and Authors.
- Books have assigned Genres which are organized hierarchically.
- All users may browse books without login.
- All entries are maintained by Administrators.
- End users may order books (the actual order mgmt being out of scope)
Running the Sample
npm run watch
Content & Best Practices
| Links to capire | Sample files / folders |
|---|---|
| Project Setup and Layouts | ./ |
| Defining Domain Models | ./db/schema.cds |
| Defining Services | ./srv/*.cds |
| Single-purposed Services | ./srv/*.cds |
| Generic Providers | http://localhost:4004 |
| Using Databases | ./db/data/*.csv |
| Adding Custom Logic | ./srv/*.js |
| Adding Tests | ./test |
| Sharing for Reuse | ./index.cds |