Skip to content

Alice and Angele#38

Open
geli-gel wants to merge 31 commits intoAda-C12:masterfrom
geli-gel:master
Open

Alice and Angele#38
geli-gel wants to merge 31 commits intoAda-C12:masterfrom
geli-gel:master

Conversation

@geli-gel
Copy link

@geli-gel geli-gel commented Nov 9, 2019

Video Store API

Congratulations! You're submitting your assignment!
If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.

Comprehension Questions

Question Answer
Explain how you came up with the design of your ERD, based on the seed data. We looked at the columns of the seed data files and used those as our fields for each model.
What would be the Big-O time complexity of your /customers & /movies endpoints? What does the time complexity depend on? Explain your reasoning. Our time complexity for both is O(n*m), this depends on n(the number of customers or movies) and m(the number of rentals associated with each).
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. Our time complexity for checking in a rental is O(n+m), this depends on n(the total amount of rentals), which gets pared down to m(the rentals that match the customer and movie given in params).
Describe a set of positive and negative test cases you implemented for a model. In Movie, we tested that a movie can exist both with rentals and without rentals.
Describe a set of positive and negative test cases you implemented for a controller. For movies in the show action, we tested that we get a JSON response with an existing movie, and a non-existent movie
How does your API respond when bad data is sent to it? It will render a JSON that has the errors.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. A custom model method that we have is the “movies_checked_out_count” method in the customer model. We chose to wrap that functionality into a method because it is a field that we wanted returned in the JSON, but not necessarily a field that we wanted to add to the database. It is a frequently changed field, so we thought it would be easier to have it as a method.
Do you have any recommendations on how we could improve this project for the next cohort? We started a Trello board, seen at the link below, however we decided it was easier for this project since we were paired for nearly 100% of it, that we just used the project requirements as a checklist, and didn't realize a Trello board was a requirement. We would recommend explicitly stating that a Trello board is required.
Link to Trello https://trello.com/b/EpJrjqNQ/video-store-api
Link to ERD https://www.lucidchart.com/invitations/accept/62440d77-b21a-4dd9-831f-fee8bfb2b79b
Summary We had a really good time working with our cross-class cohort-mates, and think that this was a manageable project that we were able to complete during the project time provided.

@beccaelenzil
Copy link

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene yes
Comprehension questions yes
General
Business Logic in Models mostly - see comment
All required endpoints return expected JSON data yes
Requests respond with appropriate HTTP Status Code yes
Errors are reported yes
Testing
Passes all Smoke Tests yes
Model Tests - all relations, validations, and custom functions test positive & negative cases yes
Controller Tests - URI parameters and data in the request body have positive & negative cases yes
Overall Great work overall. Your code is well written and well tested. It is clear that the learning goals around building a web API were met. Keep up the hard work! I've left a couple in line comments for you to review noting a place where you could put some business logic in the model and include a failure case test for the controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments