Homework 3 Reflection

  1. UI

    1. How did you integrate the book editing and deletion into your UI? Why did you choose the design you did?

      To integreate book editing and deletion in my UI I added a section to my table for actions with a pencil and trashcan icon, when the pencil is clicked it becomes a save symbol and all cells become either textboxes or a dropdown option to allow the user to edit all of the different fields associated with that book. Then to save you just click the save button with an alert saying updated successfully to tell the user the changed they made were successful. I chose this since it was the simpliest option, and in general simplicity is not a bad thing, as I would hope the user would easily understand what was going on. I also added a modal when the delete button was clicked to have the user confirm they wanted to delete it, just so they did not accidentally delete one of their books.

    2. What parts (if any) did you struggle with when implementing edit/delete in the UI?

      Since my search uses the same book table component as my main page, when you edit a book when searched the book displayed does not update without a refresh since the information is only gathered when the search button is clicked, so that has been rather difficult to decide on if I was to completely redo my implementation or just have it slightly not work on the search page, where I decided the latter. Otherwise incorporating both were relatively easyy thanks to material UI.

  2. Material UI

    1. How easy was it to refactor your existing UI to use Material UI? What pitfalls did you run into trying to use it?

      Material UI has great documentation, so it was rather easy to find all the different components I wanted to use to adjust what I currently had set up. Adding in the Material UI components allowed me to remove all the css I had, and ended up making my UI look better as well so it was not a nuisance to go back and adjust my current UI to use those components.

  3. Editing Endpoint

    1. How difficult was it to add the editing endpoint and associated tests? Did your experience writing the POST endpoints make writing the editing endpoints smoother?

      I would say writing the editing endpoint was not too difficult as it was basically my post endpoint but instead I use an UPDATE sql statement instead of an insert. Since I was able to generally reuse the same req body checks, as error messages, so my tests were generally the same as my post tests so it definitely made the process smoother since I had tests to more or less reuse with minor changes to test my put endpoint.

Back to main page