Homework 2 Reflection

Node

The two biggest changes I had to make was to change the routes in the backend by wrapping them in an express router and under an /api to separate the database calls with any front end calls. Another change was to move the AuthorDB and BooksDB out of the server and into a separate files because there kept on getting errors when I was handling it with the front end. Splitting them up into their own file allowed it to all stay in sync because its being used in both Front and back end, feels like a band-aid fix. If dont have much regrets in how I made it then because the fix for it wasnt too hard, but I guess would be to make it Express to start so this wasnt needed. I believe I only have server-side validation. My server-side checks the data being inputted/outputted if they fit the proper schema, aswell as those data being checked with the data in the database if it exists and matches. I dont think I have any specific client validation since the errors and checks are just returns of the errors when it is ran through the serverside one, so I dont think I have that. Pros of having both is that it covers all bases, both on the page so that it doesnt need to waste calls on data that wasnt gonna pass the server side checks anyway, aswell as serverside checks to make sure its checked on its last step, aswell as it preventing any problems when doing any data calls outside the website, like curls and such.

React

I honestly like using React alot more than JS DOM, that was the worst part of last class and building awebsite using that whole system was a pain so react really makes it alot easier. The experience feels alot more intuitive for my coding brain, with more templates and more automatic fixes in React. I can easily say I prefer React almost every time. Types were pretty helpful, not really a big part but I think it helped standardize what is to be expected both in the code and mentally so It didnt really help in much bugs but they still feel helpful. Its nice having a set type that I can be sure something is without having to doubt or forget which might bite me later on.

LLMs

I did use LLMs. They helped me catch errors on the types data by separating them from the main code file into a separate types.ts/.tsx file to allow consistent data and use of it later when expanding the application further. It also helped me in some of the front end writing, and the CSS to make it look a bit better and more approachable. I stand by it making it more fun if its not overused. It helps in the busy parts, like finding bugs, fixing formatting and styling, and helping you when you get lost or stuck, and making sure I dont over rely on them to the point that I dont know what it did is something I have to remind myself not to always do. I dont think it effected much of how much I learned, just sped through some of the slog parts of it a bit. I still understand how everything works, wrote a majority of the code, and made my own decisions which I think still keep me from fully relying on it.