Updating Resources in MVC Preparation
Pre-work for Updating Resources
In our next lesson, we are going to be using our MvcMovies application to update Movie and Review records. To prepare for this lesson, let’s review:
Updating Records in a Database
Work through the W3Schools SQL Update Tutorial; make sure to use the ‘Try It Yourself’ buttons and the ‘Test Yourself With Exercises’ section. As you go, answer the following questions in your notebook:
- What do you need to know about a record in order to update it?
- What are some pitfalls you need to be aware of as you are updating records?
Diagram HTTP Request/Response
In your notebook:
- Diagram the HTTP request/response for creating a new movie
- Diagram the HTTP request/response for creating a new review
Make sure that your diagrams include the HTTP Path, Verb, and any additional information you can think of for the requests. Include as much detail as you can about the response.
While this exercise is a review of functionality we have already learned, it will help us as we learn to update records - there are many similarities between creating and updating!