kayleehou / myproject

Apache License 2.0
0 stars 5 forks source link

Trimester 2 Final Review Ticket #34

Open kayleehou opened 1 year ago

kayleehou commented 1 year ago

Kaylee Hou CSP Yeung Per 4

Presentation

Fluffy Friend Finder Presentation

Runtime Links

Flask Deployed Frontend Website

Technical Achievement

As a backend developer, I created a database that holds the dogs that are up for adoption on our website! Model: image setters and getters for each of my user objects, user objects all defined image create and read function API: image garbage checking image endpoints image GET image POST image frontend code that allows user to add a new row to the table

Guides for Review:

Using Jinja2 for more efficient Coding

Video:

My Feature Demo

Github Analytics:

Team Team Fastpages image Team Team Flask: image

Bonus

Errors I had Solved: image When I was trying to POST, whenever I tried adding a new dog to my table, I would get this error. I researched and found this link especially helpful in resolving this issue. Once I installed the Allow-Control-Allow-Origin plugin, I turned it on in extensions. I ran my code again and this time got a 500 database error. Then I turned off the extension, and the new data added to the table and backend. I learned that the error stems from a security mechanism that browsers implement called the same-origin policy. The same-origin policy fights one of the most common cyber attacks out there: cross-site request forgery. In this maneuver, a malicious website attempts to take advantage of the browser’s cookie storage system.

Another error I had was whenever I clicked the add button, nothing would happen, I had to do some debugging by going into Inspect, then console and clicked breakpoints to find where the problem was. I found adding console.log into my code helpful. When I ran that with the objects in my list, I found one of the objects returned in the console as null, once I deleted it from that section of code, my program ran smoothley.

kayleehou commented 1 year ago

Live Review Grading

requirment self-grade Emma Shen Sanika S
runs on cross domain, performs all evaluations without crashing. 1 1 1
validated for garbage, data cleaned (ie validate DOB or Password) 0 0 0
Observe, Individual UI contains actions for Create, Read, 1 1 1
Observe, Individual UI contains actions for Update, Delete (above requirement) 0 0 0
Individual code quality, review and observe comments in every function, class, or method reviewed. 1 1 1
observe if individual API handles error conditions 1 1 1
observe if Individual API contains GET and POST methods 1 1 1
observe that Individual code contains database operations that support Create, Read 1 1 1
observe that Individual code contains database operations that support Update, Delete 1 1 1

Grade Avg: 7

kayleehou commented 1 year ago
requirment self-grade Emma Shen Sanika S
Review Ticket / Presentation .5 .5 .5
Runtime Links .5 .5 .5
Technical Achievements, backend focus .5 .5 .5
Guides for Review (include Blog) .5 .5 .5
Video .5 .5 .5
GitHub analytics .5 .5 .5
Bonus, substitute and personal achievement .5 .5 .5

Grade Avg: 3.5

kayleehou commented 1 year ago

CB Response: video Row 1: The purpose is for convenience, I hoped to create a feature where new dogs could be added to a database with ease. Our team goal is to encourage adopting rather than buying from breeders. We wanted to create a faux website where users could be matched with a dog and learn more about how to take care of dogs. So, when new dogs are rescued, I wanted to create a feature where it would be easy to track the dogs in my database. When the admin user inputs dog name, uid, image, link, sex, breed, dob, and price, a new row will be added into my table that displays the info. The data will also be uploaded to our backend database which contains all of our dogs. Row 2: image image image The data is stored in a dictionary called users which is displayed in raw json format. The data is in the flask link and fetched in the frontend. The GET fetch allows us to see all the dogs available in our database and with styling, we see it in a table. Row 3: image Instead of having to hand code in a new dog each time into our database, we fetch the database from the link and the data added shows up in the table and in the backened and we don't have to add it twice. The code would be a lot longer if the data wasn't stored in the link. Since there are twenty lists in our dictionary, we would've had to hard code the data into a table, instead of the table just generating the data on its own. Row 4: image image This code takes in the user input for the dog attributes and the create_user function adds a new row and user in our database. This contributes to our functionality because we want to increase efficiency, with this procedure, we don't have to add into our database each time a new dog is added, we just do it straight from the UI which is a lot easier. Row 5: image image The for loop iterates through the data the user gives and adds the user unless there is bad or duplicate data. It iterates through all 20 users and will create a new user, otherwise, it will provide an error. The if statement is in javascript, if the user provides data for all the input spaces, a new row with that data will be added. We set the dictionary myData equal to the value the user gives, so that those values are added to our database. Row 6: I only have one call in my video, I add one dog into the database.

kayleehou commented 1 year ago

CB Grading

requirment self-grade peer grade
row 1 1 1
row 2 1 1
row 3 0 0
row 4 0 0
row 5 1 0
row 6 0 0