KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm having a real hard time conceptually understanding something proper concerning URLs for versioned resources. Let's say I have an application that tracks recipes in a way very similar to a version control system, like old school like RCS or something. Each version can be a working copy for some time then have a new version created from it. Each version has comments associated with it and doesn't share comments. I can go back historically at any time and look at the recipe as it evolved, but each instance is always considered a version of the same recipe. I'm trying to figure out the most appropriate way to construct URLs to reference these and I'm having trouble understand some of the differences between like subresources and temporal resources and such. The two main ways I've seen this done are: > 1) query parameters > -- /recipes/ultimate-thing -> List of available versions of Ultimate Thing > -- /recipes/ultimate-thing?version=2 -> Version 2 of Ultimate Thing > -- /recipes/ultimate-thing?version=latest -> Current working version of Ultimate Thing 2a) Nested resources with versions considered subresources -- /recipes/ultimate-thing/versions/ -> List of available versions of Ultimate Thing -- /recipes/ultimate-thing/versions/2 -> Version 2 of Ultimate Thing -- /recipes/ultimate-thing -> Current working version of Ultimate Thing 2b) Nested resources with the list at the resource -- /recipes/ultimate-thing -> List of available versions of Ultimate Thing -- /recipes/ultimate-thing/versions/2 -> Version 2 of Ultimate Thing -- /recipes/ultimate-thing/versions/latest -> Current working version of Ultimate Thing I feel like everytime I try to convince myself of one way of doing it I feel like I lack the understand to construct a proper justification for that method. 1 seems to be preferred by a lot of
Tags (comma-separated)
Save Edits
Cancel