The changes I made in my back-end were all for functionality reasons. For example, my search property was by book title, but I had wanted to make it a contains search rather than an exact match. For this, I had to change my GET request. I had also wanted to make updates to my back-end to clean up what I had written for Homework 1, but I did not get to it. The only Homework 1 update I mhad made was to change the ID to auto increment rather than submitting an id. In the future, I would have a cleaner back-end by separating my api calls into different files and having cleaner tests.
I relied solely on server-side validation. This is because if an error had occured, the server would prevent the request and return an error message. I did however, add that the input for numerical fields has to be of type "number". The pros of having server-side validation is that all of the errors are consistent and only valid requests can be made. The pros of having client-side validation is that the client can reject invalid data and prevent sending data for the server to reject. The cons of not having server-side validation is that the system entirely reliant on the client to prevent invalid data from being requested. The cons of not having client-side validation is that it is inefficient to send invalid data when checks can be put in place to immediately reject the data.
While working on this homework, I referenced a lot of the work from the in-class activities. I found this especially helped when working with the React components. I think this saved me a lot of headache as I already had a working reference. I only really struggled with the sorting and implementing a search.
I found that the front-end complained more about typing, but I think this due to vite. I did not ending up having any bugs that needed to be caught. Vite complained about using any types, which alerted me when a variable was not typed. I did not have to use many manual annotations and I did not use any frequently. This is because the type was usually easy to assume or I would run the code to see which type was a best fit for my variable.
I found it much easier to write an SPA front-end rather than a MPA front-end. This is mostly because it takes less code to achieve the same result. It felt much more intuitive as a lot of my code ended up being reusable whereas in an MPA format, I would have to restructure the page every time.
Back