Skip to content

Commit b3bba14

Browse files
committed
fix(docs): enhance clarity and detail in v2.0 announcement blog post
1 parent 9038bad commit b3bba14

1 file changed

Lines changed: 42 additions & 43 deletions

File tree

cap/docs/v2-announcement.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: "From the Cinema to the Cloud: Announcing v2.0"
2+
title: "From the Cinema to the Cloud: Announcing v2.0 of the Cloud CAP HANA SWAPI Sample"
33
---
44

5-
# From the Cinema to the Cloud: Announcing v2.0
5+
# From the Cinema to the Cloud: Announcing v2.0 of the Cloud CAP HANA SWAPI Sample
66

77
## A Long Time Ago in a Cinema Far, Far Away
88

99
I was six years old in 1980.
1010

11-
Which means I was exactly the right age to have my brain completely rewired by *The Empire Strikes Back*.
11+
Which means I was exactly the right age to have my brain completely rewired by *Star Wars: The Empire Strikes Back*.
1212

13-
I remember sitting in that darkened theater, eyes wide, watching Star Destroyers that filled the entire screen, an asteroid field that felt genuinely dangerous, and a revelation at the end that I'm still not going to spoil even though everyone on earth has had 45 years to catch up. I walked out of that cinema convinced of two things: space was real and stories mattered.
13+
I remember sitting in that darkened theater, eyes wide, watching Star Destroyers that filled the entire screen, an asteroid field that felt genuinely dangerous, and a revelation at the end that I'm still not going to spoil even though everyone on earth has had 45 years to catch up. I walked out of that cinema convinced of two things: space was really interesting and stories mattered.
1414

15-
Those two convictions have shaped everything I've done since including, it turns out, this project.
15+
Those two convictions have shaped everything I've done since including, it turns out, this project.
1616

1717
I became a developer, but I never stopped being someone who believed that the *way* you tell a story about technology matters as much as the technology itself. Which is probably why, when I needed a dataset to demonstrate SAP Cloud Application Programming Model patterns, I reached for the one universe I've loved since I was six.
1818

@@ -24,20 +24,20 @@ If you've spent any time in web development over the last decade, you've probabl
2424

2525
Paul Hallett built it in 2014 as a REST learning tool, and it became something of a cultural fixture in developer education. Every tutorial that needed "some real data to work with" reached for SWAPI. It has 87 characters, 60 planets, 37 starships, 39 vehicles, 14 species, and 6 films — all neatly organized, consistently structured, and immediately recognizable.
2626

27-
The brilliance of SWAPI as a teaching tool is that **you already know the data**. When a tutorial shows you `{"name": "Luke Skywalker", "height": "172", "homeworld": "Tatooine"}`, you don't need to understand the domain. You already live there. That frees your brain to focus on what the tutorial is actually teaching.
27+
The brilliance of SWAPI as a teaching tool is that so many of **you already know the data**. When a tutorial shows you `{"name": "Luke Skywalker", "height": "172", "homeworld": "Tatooine"}`, you don't need to understand the domain. You already live there. That frees your brain to focus on what the tutorial is actually teaching.
2828

2929
---
3030

3131
## SWAPI Meets CAP
3232

33-
About two years ago I needed a sample application to demonstrate SAP CAP patternsspecifically the parts that are genuinely tricky to teach: many-to-many relationships, multi-database profiles, exposing the same data model as OData v4, OData v2 (via adapter), GraphQL, and REST all at once, managed entities with `cuid`, authorization roles, event-driven patterns.
33+
A few years ago I needed a sample application to demonstrate SAP CAP patterns, specifically the parts that are genuinely tricky to teach: many-to-many relationships, multi-database profiles, exposing the same data model as OData v4, OData v2 (via adapter), GraphQL, and REST all at once, managed entities with `cuid`, authorization roles, and event-driven patterns.
3434

3535
SWAPI was the obvious choice. Here's why it works so well:
3636

3737
- **Many-to-many relationships everywhere**: Films connect to characters, planets, starships, vehicles, and species. Every junction table is a teaching moment.
38-
- **Familiar data, unfamiliar patterns**: Learners already understand who Han Solo is. They can focus on *how* the data is modeled, not *what* it represents.
38+
- **Familiar data, unfamiliar patterns**: Most learners already understand who Han Solo is. They can focus on *how* the data is modeled, not *what* it represents. And even if you haven't seen any of the films (what have you been doing with your life?), the data is still fun, engaging, and easy to explore.
3939
- **Multi-profile story**: The same schema runs on SQLite locally, PostgreSQL for teams, and SAP HANA Cloud for production. The data doesn't care which backend you use.
40-
- **Rich enough to be realistic**: 87 characters across 6 films gives you enough data that queries feel real, but small enough that everything loads fast.
40+
- **Rich enough to be realistic**: 87 characters across 6 films gives you enough data that queries feel real, but small enough that everything loads fast and local development is smooth.
4141

4242
The original `cloud-cap-hana-swapi` was well-received. It showed developers exactly what it was designed to show, and I was happy with it.
4343

@@ -51,34 +51,34 @@ SWAPI covers six films.
5151

5252
Episodes I through VI. The Phantom Menace through Return of the Jedi. The dataset that was complete in 2014 when Paul built it, and hasn't changed since.
5353

54-
Meanwhile, the Star Wars universe exploded. The Mandalorian. Andor. The Book of Boba Fett. Obi-Wan Kenobi. Ahsoka. Bad Batch. Two more films announced. The franchise that was six films when SWAPI launched is now fifteen live-action shows and counting not to mention Visions, Tales of the Jedi, and everything else.
54+
Meanwhile, the Star Wars universe exploded. The Mandalorian. Andor. The Book of Boba Fett. Obi-Wan Kenobi. Ahsoka. Bad Batch. Two more films announced. The franchise that was six films when SWAPI launched is now fifteen live-action shows and counting, not to mention Visions, Tales of the Jedi, and everything else.
5555

56-
From a CAP modeling standpoint, I was also leaving the most interesting part of the problem unsolved. The original sample had no concept of a *Show* or an *Episode*no composition relationships, no parent-child cascades, no aggregation views. Just films and their related entities, flat.
56+
From a CAP modeling standpoint, I was also leaving the most interesting part of the problem unsolved. The original sample had no concept of a *Show* or an *Episode*, no composition relationships, no parent-child cascades, no aggregation views. Just films and their related entities, many-to-many but flat.
5757

5858
I wanted Shows. I wanted Episodes. I wanted the real data to go with them.
5959

60-
Which meant I needed to go to Wookieepedia.
60+
Which meant I needed to go to the source: Wookieepedia.
6161

6262
---
6363

6464
## Scraping Wookieepedia (Or: How I Spent My Weekend)
6565

66-
[Wookieepedia](https://starwars.fandom.com/wiki/Wookieepedia) is the Star Wars wiki a remarkable volunteer effort that documents essentially every episode, character, and planet across the entire franchise.
66+
[Wookieepedia](https://starwars.fandom.com/wiki/Wookieepedia) is the Star Wars wiki. It's a remarkable volunteer effort that documents essentially every episode, character, and planet across the entire franchise.
6767

6868
It also exposes the [MediaWiki API](https://www.mediawiki.org/wiki/API:Main_page), which made it possible to build a scraper.
6969

70-
The scraper`cap/scraper/` works in two passes:
70+
The scraper, `cap/scraper/`, works in two passes:
7171

7272
1. **Discovery**: Fetch the list of all Star Wars films and live-action shows, with their episode lists.
73-
2. **Enrichment**: For each episode, fetch detailed metadata director, writer(s), air date, season and episode number, opening crawl (where available), and the full cast of characters, planets, starships, vehicles, and species that appear.
73+
2. **Enrichment**: For each episode, fetch detailed metadata, such as director, writer(s), air date, season and episode number, opening crawl (where available), and the full cast of characters, planets, starships, vehicles, and species that appear.
7474

7575
The challenges were real:
7676

77-
- **Rate limiting**: Wookieepedia is a volunteer project. The scraper uses conservative rate limits and backs off on 429s. Be respectful.
78-
- **Inconsistent data**: "Ahsoka Tano" and "Ahsoka" and "Ahsoka Tano (Fulcrum)" are the same person. The normalization logic to reconcile entity names across 772 episodes is... something.
79-
- **Caching**: Once you have the data, you don't want to re-fetch it. The scraper writes a disk cache that's committed to the repo. `npm run scrape` uses the cache by default. `npm run scrape:bypass-cache` hits the live API and prompts you to confirm before making network calls.
77+
- **Rate limiting**: Wookieepedia is a volunteer project. The scraper uses conservative rate limits and backs off on 429s. We needed to be respectful.
78+
- **Inconsistent data**: "Ahsoka Tano" and "Ahsoka" and "Ahsoka Tano (Fulcrum)" are the same person. The normalization logic to reconcile entity names across 772 episodes is... a lot.
79+
- **Caching**: Once you have the data, you don't want to re-fetch it. The scraper writes a disk cache that's committed to the repo. `npm run scrape` uses the cache by default. `npm run scrape:bypass-cache` hits the live API and prompts you to confirm before making network calls. This way, you can update the dataset if you want, but it's not going to happen by accident and if you just want to use the sample right after a pull, you don't have to wait for the scraper to run.
8080

81-
The result: **11 films, 15 shows, 772 episodes**. Every episode linked to its characters, planets, vehicles, starships, and species. Everything cross-referenced. The SWAPI dataset is still in there it's just no longer the whole story.
81+
The result: **11 films, 15 shows, 772 episodes**. Every episode linked to its characters, planets, vehicles, starships, and species. Everything cross-referenced. The SWAPI dataset is still in there, but it's no longer the whole story.
8282

8383
---
8484

@@ -88,9 +88,9 @@ The new data model is where v2.0 really earns its version number.
8888

8989
### Shows and Episodes
9090

91-
The `Show` entity represents a Star Wars series or film anthology *The Mandalorian*, *Andor*, *The Clone Wars*. Each show has basic metadata: title, release year, total seasons.
91+
The `Show` entity represents a Star Wars series or film anthology, like *The Mandalorian*, *Andor*, or *The Clone Wars*. Each show has basic metadata: title, release year, total seasons.
9292

93-
`Episode` is a **composition child of `Show`** — meaning episodes belong to their show and cascade-delete with it. Each episode carries its own metadata: `director`, `writer`, `season_number`, `episode_number`, `air_date`, and `opening_crawl` (for the films that have one).
93+
`Episode` is a **composition child of `Show`** which means episodes belong to their show and cascade-delete with it. Each episode carries its own metadata: `director`, `writer`, `season_number`, `episode_number`, `air_date`, and `opening_crawl` (for the films that have one).
9494

9595
```cds
9696
entity Show : managed {
@@ -118,7 +118,7 @@ entity Episode : managed {
118118

119119
### Episode Junction Tables
120120

121-
Five `Episode2*` junction entities link episodes to the core character set`Episode2People`, `Episode2Planets`, `Episode2Starships`, `Episode2Vehicles`, `Episode2Species`. Because they're compositions of `Episode`, they cascade correctly. They also let you ask the interesting questions: which characters appear across both *Rebels* and *Andor*? Which planets show up in both the Clone Wars and the live-action shows?
121+
Five `Episode2*` junction entities link episodes to the core character set: `Episode2People`, `Episode2Planets`, `Episode2Starships`, `Episode2Vehicles`, `Episode2Species`. Because they're compositions of `Episode`, they cascade correctly. They also let you ask the interesting questions like which characters appear across both *Rebels* and *Andor*? Which planets show up in both the Clone Wars and the live-action shows?
122122

123123
### Show2* Aggregation Views
124124

@@ -137,29 +137,35 @@ No physical tables. The view derives from episode data automatically. Want to kn
137137

138138
A new `StarWarsEpisode` read-only service exposes all of this:
139139

140-
```
140+
```bash
141141
GET /odata/v4/StarWarsEpisode/Shows
142142
GET /odata/v4/StarWarsEpisode/Episodes
143143
GET /odata/v4/StarWarsEpisode/Episode2People
144144
```
145145

146-
And the Media Browser Fiori app gives you a UI to explore itfilter by show, drill into episodes, see the full cast.
146+
And the Media Browser Fiori app gives you a UI to explore it. You can filter by show, drill into episodes, or see the full cast.
147147

148148
---
149149

150150
## The Docs Site That Finally Does It Justice
151151

152-
One of my ongoing frustrations with this project was that the interesting architectural decisions were buried in a README that nobody reads.
152+
One of my ongoing frustrations with this project was that the interesting architectural decisions were buried in a README that was difficult to navigate and easy to miss. The data model is the real star of the show, but it was hidden in a wall of text.
153153

154-
v2.0 ships a proper documentation site built with [VitePress](https://vitepress.dev/). You're reading it right now.
154+
v2.0 ships a [proper documentation site](https://sap-samples.github.io/cloud-cap-hana-swapi/) built with [VitePress](https://vitepress.dev/).
155+
156+
![VitePress documentation site homepage with Star Wars opening crawl animation](/blog/site-homepage.png)
155157

156158
A few things worth calling out:
157159

158160
**The themes.** The site ships with two CSS themes: *Imperial Dark* (a high-contrast dark theme that probably looks familiar if you've ever seen the inside of a Star Destroyer) and *Jedi Archives* (warm, parchment-toned light mode). Toggle between them with the theme switcher in the nav.
159161

160162
**The opening crawl.** The homepage has an animated Star Wars opening crawl. It's not subtle and I have no regrets.
161163

162-
**The CDS Cheat Sheet.** This one I'm genuinely proud of. If you work with SAP CAP, bookmark [the cheat sheet](https://sap-samples.github.io/cloud-cap-hana-swapi/reference/cheat-sheet.html). It covers:
164+
**The CDS Cheat Sheet.** This one I'm genuinely proud of. If you work with SAP CAP, bookmark [the cheat sheet](https://sap-samples.github.io/cloud-cap-hana-swapi/reference/cheat-sheet.html).
165+
166+
![CDS Cheat Sheet — comprehensive reference for CAP modeling patterns](/blog/site-cheatsheet.png)
167+
168+
It covers:
163169

164170
- Entity definition patterns with `managed`, `cuid`, `temporal`
165171
- Many-to-many with explicit junction entities (the right way)
@@ -171,40 +177,33 @@ A few things worth calling out:
171177
- Virtual fields and computed properties
172178
- Multi-profile configuration
173179

174-
It's the reference I wish I'd had when I started learning CAP.
175-
176180
**Architecture deep-dives.** The Shows & Episodes section walks through the full composition hierarchy, the view aggregation pattern, and why the data model is designed the way it is.
177181

178-
**Five hands-on labs.** From "model your first entity" to "write authorization tests" — step-by-step exercises with the Star Wars dataset as the playground.
179-
180-
![VitePress documentation site homepage with Star Wars opening crawl animation](/blog/site-homepage.png)
181-
182-
![CDS Cheat Sheet — comprehensive reference for CAP modeling patterns](/blog/site-cheatsheet.png)
183-
184182
![Shows and Episodes architecture documentation page](/blog/site-shows-episodes.png)
185183

184+
**Five hands-on labs.** From "model your first entity" to "write authorization tests": step-by-step exercises with the Star Wars dataset as the playground.
185+
186186
---
187187

188188
## A Fresh Look at the Data
189189

190-
The original data viewer in this project was... functional.
190+
The original data viewer in this project was... functional. I had borrow it from another of the SAP CAP Samples. It got the job done, but it wasn't going to win any design awards.
191191

192-
The v2.0 viewer app is something you'd actually want to use.
192+
The v2.0 viewer app is something you'll hopefully actually want to use.
193193

194-
It ships with two themes (*Galaxy* — deep space dark mode, and *Light* — for when you're working in a bright room and don't want to feel like you're reading a terminal). Pagination that actually works, including graceful handling when `@odata.count` comes back as 0. Sortable columns. A filter bar. Keyboard navigation.
194+
It ships with two themes (*Galaxy* — deep space dark mode, and *Light*, keeping with the Star Wars aesthetic). Pagination that actually works, including graceful handling when `@odata.count` comes back as 0. Sortable columns. A filter bar. Keyboard navigation.
195+
![Media Browser app showing the list of Star Wars shows and films](/blog/fiori-media.png)
195196

196-
The feature I use most: the **detail panel**. Click any row and a panel slides in from the right showing the full entity details without navigating away from the list. It's the difference between "I can look up data" and "I enjoy looking up data."
197+
The feature I use most: the **detail panel**. Click any row and a panel slides in from the right showing the full entity details without navigating away from the list. It's the difference between "I can look up data" and "I enjoy looking up data."
197198

198199
![Viewer app in Galaxy dark theme showing list of Star Wars films](/blog/viewer-galaxy.png)
199200

200201
![Viewer app with detail panel open showing film details](/blog/viewer-detail.png)
201202

202-
And the Fiori launchpad ties everything together one page with tiles for People, Films, and Shows, each launching the appropriate Fiori Elements app:
203+
And the Fiori launchpad ties everything together with one page with tiles for People, Films, and Shows, each launching the appropriate Fiori Elements app:
203204

204205
![Fiori launchpad with People, Films, and Shows tiles](/blog/fiori-launchpad.png)
205206

206-
![Media Browser app showing the list of Star Wars shows and films](/blog/fiori-media.png)
207-
208207
---
209208

210209
## Try It
@@ -230,6 +229,6 @@ If you find issues, [open an issue on GitHub](https://github.com/SAP-samples/clo
230229

231230
---
232231

233-
*If you want to understand the data model, start with the [CDS Cheat Sheet](https://sap-samples.github.io/cloud-cap-hana-swapi/reference/cheat-sheet.html) — it'll save you hours.*
232+
*If you want to understand the data model, start with the [CDS Cheat Sheet](https://sap-samples.github.io/cloud-cap-hana-swapi/reference/cheat-sheet.html). It'll save you hours.*
234233

235234
*If you want to understand why this project exists, rewatch Empire Strikes Back. You'll figure it out.*

0 commit comments

Comments
 (0)