This video demonstrates the two main approaches to versioning.
- View Offline
- [Instructor] Versioning is the final thing we'll tackle…in this course.…Hopefully, it's not a problem you have to solve everyday.…But, I guarantee you it will come up at some point.…We talked about it in the lecture portion.…Remember that our goal is to only change the version…when we have breaking changes.…So, then the fastest and easiest approach in Slim…that I found is using groups.…From the last lab, we showed how to use a group…that we can apply a series of rows.…We'll do the same thing here.…In this case, it's really simple.…
Say app, group, say slash v1, map it to our function here.…And close it out.…Then let's do it again, just to make sure that we've got it.…Group, slash v2, function and now we can take…any of the routes from below, such as the messages route…and we can copy, paste this, directly into our group.…So we can copy and paste this directly into the v1 group…and now, whenever a request comes from v1 slash messages,…it would automatically get routed directly to this path.…
And now, under version two,…
This course begins with a simple application specification and builds it one step at a time. Each chapter includes a key concept, with examples from other public APIs, and then shows how to build it yourself with Slim. Learn about URL routing, validating input, and generating response codes and hypermedia payloads. Like any project, the first implementation may be a little messy but don't worry. The last chapter covers refactoring and what it takes to scale and support the API going forward.
- Understanding the project goals
- Setting up the database
- Adding authentication in Slim
- Using cross-framework and authentication middleware
- Creating a read-write API in Slim
- Uploading files via the API
- Adding file security
- Creating payloads and response codes in Slim
- Scaling your API