Closed GradedJestRisk closed 4 years ago
I thought slug
was used to describe a "semantic" identifier, one derived from a property of the resource. Checking the MDN docs, you're right, though.
I think the simplest would be to call it id from the start as a non-numeric id is also an id. That would make the route definition look like /bands/:id/songs
.
That change needs to be carried through several chapters and the source code but I'll do it for the next release or the one after that. Thanks for pointing it out.
Well, I'm happy to discover this glossary, thanks ! Maybe you don't need to fix all occurrences if that's time expensive, maybe just pointing out the word used in the book doesn't conform to MDN definition ? In opened this issue cause I'm newbie in web app, and it caused me some confusion. If most of the readers have basic web-app skills, they'll be fine with slug.
I'm a newbie in web-app and found slug, in Wikipedia, refers to the last path fragment of URL.
In chapter 5 "Tuning", we've got
The real slug would be
songs
The following page seems to get in this way
But I finally understood
What you called slug is the band slug, the band "resource identifier" in the URL. It's the name, would it appear as a slug (but also as a path fragment). Eg.
foo-fighters
, as opposed toFoo Fighters
, the band name in the UI.So I suggest